当推送到原点时,Gitlab 6.2请求用户名和密码认证(Gitlab 6.2 asking for username and password authentication when pushing

编程入门 行业动态 更新时间:2024-10-25 06:30:44
当推送到原点时,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.git

Check 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

更多推荐

本文发布于:2023-08-06 22:15:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1457573.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:原点   用户名   密码   Gitlab   origin

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!