在github的项目中可以看到有一个

git@github.com:qssq/FileRedirect.git
和之前的明文密码输入提交的地址
https://github.com/qssq/FileRedirect.git
是不同的,这里已经举例了两种,https的方式提交目前已经不行了,这个我另外一篇文章https://www.jianshu.com/p/f40a54e61ab4 有提到几种解决办法,现在这里又补充一种新的办法,这种办法也算比较古老,只是我给忘给老师了,因为那种直接输入git账号的方法让我习惯了,慢慢把这个技术忘记了。。我摸索了一下又把忘记的知识捡回来了。
上面的截图是因为我已经生成了一个,所以没有提示让我填写OpenSSH,有提示的会跳转到https://github.com/settings/keys
https://github.com/settings/ssh/new
也就是如下界面

添加界面

生成Open Keys 填写到Key输入框就好了,
格式大概是ssh-rsa 之类的开头 或者其它之类的ds,ecdsa ed25519 ssh-1之类的, 我就生成 接下来软件默认的。
这里讲的是使用 TortoiseGit。首选下载这个软件,它会携带PuTTY Key Generator 这个软件。

收线 点击生成,Generate然后上面的输入框内容会产生,把它完整的复制到github上去,然后把你的私钥ppk文件保存起来。。

然后在window文件夹右击 git clone 会弹出这样一个输入框,地址填写ssh地址,
加载putty秘钥就是上面保存的私钥。

点击确定让你输入密码,这个密码我之前说过是点击生成Open SSH的时候填写的密码。
然后来了个警告,点确定就行了。


网友评论