我在 Linux Debian 机器上运行 GitLab 6.2,看起来我无法从命令行推送到远程存储库。
每次我做一个
git push -u origin master
它要求输入用户名和密码(我已将来源添加为 HTTP 远程)
最佳答案
检查您的 Remote 是否设置为使用 http/https:
$ git remote -v
origin https://somedomain.com/username/repo.git (fetch)
origin https://somedomain.com/username/repo.git (push)
如果看起来像上面这样,请尝试切换到使用 ssh,如下所示:
$ git remote rm origin
$ git remote add origin git@somedomain.com:username/repo.git
关于Gitlab 6.2 在推送到源时要求用户名和密码身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19906421/