码迷,mamicode.com
首页 > Windows程序 > 详细

Windows下GIT的SSH设置

时间:2016-11-30 23:11:47      阅读:280      评论:0      收藏:0      [点我收藏+]

标签:.com   git bash   keygen   atlas   windows   ldo   oschina   执行   jin   

GIT http://www.tuicool.com/articles/A3Mn6f

 

使用场景复原

git push -u origin master 报错

 

参考官方文档

https://confluence.atlassian.com/bitbucket/use-the-ssh-protocol-with-bitbucket-cloud-221449711.html

执行

ssh-keyscan -t rsa bitbucket.org

获取SSH key之后报错 已存在

 

修正为

ssh-keygen -t rsa -C "xxxxxx@yy.com"

windows保存位置

C:\Users\Excuse\.ssh

git bash 命令 cd c:/users/excuse/.ssh/newkey

 

将生成pub key复制到github创建key

保存后执行

git push -u origin master 报错

Permission denied (publickey).
fatal: Could not read from remote repository.

 

执行 ssh-add 报错

Could not open a connection to your authentication agent.

 

执行 eval `ssh-agent`

OK

 

执行 ssh-add ~/.ssh/tony

OK

 

执行 ssh-add -l

OK

 

执行

git push -u origin master

OK

 

参考

http://blog.chinaunix.net/uid-22355887-id-3342499.html

http://www.cnblogs.com/sheldonxu/archive/2012/09/17/2688281.html

http://www.linuxidc.com/Linux/2015-11/125435.htm

http://blog.itpub.net/25851087/viewspace-1262468/

http://www.jianshu.com/p/31cbbbc5f9fa/

http://jingyan.baidu.com/article/a65957f4e91ccf24e77f9b11.html

http://www.oschina.net/question/54100_10489

Windows下GIT的SSH设置

标签:.com   git bash   keygen   atlas   windows   ldo   oschina   执行   jin   

原文地址:http://www.cnblogs.com/GardenKeeper/p/5238078.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!