gitlab 相关踩坑

1、git小乌龟出现Disconnected: No supported authentication methods available (Sever sent: public key)的解决方法

打开TortoiseGit->设置 - >网络,
在ssh客户端我更改“TortoiseGitPlink.exe”为“ssh.exe”。

PS:ssh.exe可以在安装目录 \ Git \ usr \ bin中寻找

2、首次克隆不下来可以用右键Git Bash

gitlab 相关踩坑_第1张图片

命令:Git clone [email protected]:cdc-ip/chronic-disease-web.git
Cloning into 'chronic-disease-web'

克隆成功:

gitlab 相关踩坑_第2张图片

3、未配置秘钥报错:

gitlab 相关踩坑_第3张图片

配置秘钥命令:

ssh-keygen -t ed25519 -C "邮箱@sinosoft.com"

gitlab 相关踩坑_第4张图片

秘钥生成成功。

gitlab 相关踩坑_第5张图片

 查看秘钥命令:cat /c/Users/admin/.ssh/id_ed25519.pub

gitlab 添加秘钥

gitlab 相关踩坑_第6张图片

4、用户名邮箱不匹配查看并修改:

gitlab 相关踩坑_第7张图片

 .gitconfig查看是否与当前所需用户名邮箱匹配:

gitlab 相关踩坑_第8张图片

修改用户名与邮箱命令:

修改用户名:git config --global user.name

查看用户名: git config user.name

修改邮箱:git config --global user.email 邮箱@sinosoft.com.cn

查看邮箱: git config user.email
 

gitlab 相关踩坑_第9张图片

5、提示No supported authentication methods available ( server sentpublickey , gssapi-keyex , gssapi-with-mic

gitlab 相关踩坑_第10张图片

 小乌龟没有设置git路径

gitlab 相关踩坑_第11张图片

 修改为

gitlab 相关踩坑_第12张图片

 

你可能感兴趣的:(Git,git)