Windows下GIT的SSH设置

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

转载于:https://www.cnblogs.com/GardenKeeper/p/5238078.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值