GIT:推送到远程服务器的远程

问题描述:

我通过ssh命令连接到(大学的)远程服务器。我想从该服务器将上游数据推送到远程git存储库。我试图只通过https(ssh键没有设置)。GIT:推送到远程服务器的远程

我想通过命令来做到这一点: git push -u https://gitlab.com/username/reponame.git master 但GitLab甚至不问我关于我的凭据(资料库是私人,所以我会期待一些授权)。

我该怎么办?

编辑:

回应评论(延迟,但由于太多的SSH连接,我是从大学网络踢不好意思):

@Salmangit 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

+0

首先尝试'git remote show origin' – Salman

+0

任何错误 - 如果是的话,你可以附加它吗? –

+0

@Salman我回答了问题 – franiis

Failed to connect to gitlab.com port 443: Connection timed out

这应该是一个proxy issue, as described here
这是典型的当你没有直接的互联网访问,但必须首先设置代理。

+0

谢谢,但我没有缓存任何错误的凭据(在'''git config -l'''中) – franiis

+0

@franiis好的,我已经重写了解决您的实际错误消息的答案。 – VonC

+0

看起来像是我的问题。我会尝试获取代理信息并设置它,如果它工作,我会接受这个答案。谢谢。 – franiis