我通过ssh
命令连接到(大学的)远程服务器。我希望将上游数据从该服务器推送到远程git存储库。我只想通过https (ssh键没有设置)来实现它。
我试图通过命令:git push -u https://gitlab.com/username/reponame.git master
来实现它,但是GitLab甚至都不问我的凭据(存储库是私有的,所以我希望得到一些授权)。
我该怎么做呢?
编辑:(很抱歉耽搁了,但是由于ssh连接太多,我被踢出了大学网络)
对评论的答复:
@Salman:git remote show origin
不工作
(没有设置原点:fatal: 'origin' does not appear to be a git repository
),
(原点设置为git@gitlab.com:username/reponame.git
- error 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
发布于 2017-02-26 15:12:57
https://stackoverflow.com/questions/42469554
复制相似问题