GIT:推送到远程服务器的远程
我通过ssh
命令连接到(大学的)远程服务器。我想从该服务器将上游数据推送到远程git存储库。我试图只通过https(ssh键没有设置)。GIT:推送到远程服务器的远程
我想通过命令来做到这一点: git push -u https://gitlab.com/username/reponame.git master
但GitLab甚至不问我关于我的凭据(资料库是私人,所以我会期待一些授权)。
我该怎么办?
编辑:
回应评论(延迟,但由于太多的SSH连接,我是从大学网络踢不好意思):
@Salman: git remote show origin
没有按” t work
(without set origin:fatal: 'origin' does not appear to be a git repository
),
(原产设置为[email protected]:username/reponame.git
- 错误ssh: connect to host gitlab.com port 22: Connection timed out
)
@sajib汗:我获得以下错误: fatal: unable to access 'https://gitlab.com/username/reponame.git/': Failed to connect to gitlab.com port 443: Connection timed out
Failed to connect to gitlab.com port 443: Connection timed out
这应该是一个proxy issue, as described here。
这是典型的当你没有直接的互联网访问,但必须首先设置代理。
首先尝试'git remote show origin' – Salman
任何错误 - 如果是的话,你可以附加它吗? –
@Salman我回答了问题 – franiis