当推送到原点时,Gitlab 6.2请求用户名和密码认证(Gitlab 6.2 asking for username and password authentication when pushing to origin)
我在Linux Debian盒子上运行GitLab 6.2,看起来我不能从命令行推送到远程仓库。
每次我做一个
git push -u origin master
它要求输入用户名和密码(我已经将来源添加为HTTP远程)
I'm running GitLab 6.2 on a Linux Debian box and it looks like I can't push to the remote repository from the command line.
Every time I do a
git push -u origin master
it asks for the username and password (I've added the origin as an 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.gitCheck that your remotes aren't set to use http/https:
$ git remote -v origin https://somedomain.com/username/repo.git (fetch) origin https://somedomain.com/username/repo.git (push)If it looks like the above, try switching to using ssh like so:
$ git remote rm origin $ git remote add origin git@somedomain.com:username/repo.git更多推荐
发布评论