返回列表 发布新帖

Gitlab-JH git push 提交每次都要输入用户名密码 如何解决?

399 7
发表于 2024-6-19 16:48:07 | 显示全部楼层 阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×

GIT push 到极狐 每次都要提示用户名密码

已经参考官方文档 生成了 ssh-keygen -t ed25519 并且复制SSHKEY 到账户的SSHKEY 里面

ssh -T [email]git@192.168.30.90[/email] 也收到了欢迎信息

测试代码push

git add .

git commit -m "xxxx"

git remote add origin git@xxxx/xxx.git

git push -u orgin gittest

就提示输入 用户名 密码了

求助

回复

使用道具 举报

评论7

zookeeperLv.7 发表于 2024-6-19 17:15:08 | 显示全部楼层
git remote -v 看看origin是否符合预期
回复

使用道具 举报

yamano023楼主Lv.1 发表于 2024-6-19 17:33:08 | 显示全部楼层
zookeeper 发表于 2024-6-19 17:15
git remote -v 看看origin是否符合预期

没问题的   远程仓库是正常的

就是现在git 版本更新了  教程上是master  然后 sshkey 好像rsa的不行了   换的 ed25519

回复

使用道具 举报

wangkaixuanLv.7 发表于 2024-6-19 20:04:54 | 显示全部楼层
ssh -T  git@192.168.1.100

Welcome to GitLab, @root!

返回的信息是@用户还是 anonymous呢

另外就是可以查看下 ~/.ssh/config文件,可以指定你的ssh的key

Host gitlab.com
  HostName github.com
  IdentityFile ~/.ssh/id_rsa_github
回复

使用道具 举报

yamano023楼主Lv.1 发表于 2024-6-20 08:45:24 | 显示全部楼层
wangkaixuan 发表于 2024-6-19 20:04
ssh -T  

Welcome to GitLab, @root!

~/.ssh/config     没有这个文件    是需要自己创建配置吗?

ssh-keygen  -t ed25519    这样创建的密钥   /root/.ssh/id_ed25519.pub  公钥和私钥 生成的这两个文件

回复

使用道具 举报

wangkaixuanLv.7 发表于 2024-6-20 10:12:30 | 显示全部楼层
是的 自己编辑一个这个文件 然后再试试
回复

使用道具 举报

安夏_Lv.1 发表于 2024-8-16 13:56:59 | 显示全部楼层
在glitlab 中设置密钥认证的密钥信息
回复

使用道具 举报

机器人168号Lv.2 发表于 2024-8-16 14:31:37 | 显示全部楼层
本帖最后由 机器人168号 于 2024-8-16 14:33 编辑

上传的是公钥么
回复

使用道具 举报

意见建议

Email:forum@gitlab.cn
  • 关注公众号
  • 添加专业顾问
Copyright © 2001-2024 极狐GitLab论坛 版权所有 All Rights Reserved. 鄂ICP备2021008419号-1|鄂公网安备42018502006137号
关灯 快速发帖
扫一扫添加专业顾问
返回顶部
快速回复 返回顶部 返回列表