Git SSH 配置以及git操作Authentication failed for错误解决

配置ssh公钥访问oschina

使用ssh-kengen工具生成公钥(public key)


1480521-253c1e5923c877c4.png
ssh-keygen -t rsa -C "[email protected]"# Creates a new ssh key using the provided email # Generating public/private rsa key pair...

查看生成的公钥,并将公钥内容拷贝添加到Git @ OSC http://git.oschina.net/keys


1480521-650975fc22a64a53.png

通过如下的命令可以查看是否设置公钥成功


1480521-f7cdb9de062e8644.png

Authentication failed for 问题解决:

如果push遇到在输入密码是熟错后,就会报这个错误fatal: Authentication failed for

解决办法:

git config --system --unset credential.helper

之后你在push就会提示输入名称和密码

猜你喜欢

转载自blog.csdn.net/weixin_33733810/article/details/87264622