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