執行git push -u origin master
fatal: 'git@github.com:qilinonline/git_test.git' does not appear to be a git repository fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
原因:使用地址不對,這里采用了ssh地址,但是你沒有添加ssh秘鑰,所以無法連接遠程倉庫
解決辦法:
1.使用https地址
2.添加ssh秘鑰
1:生成秘鑰:ssh-keygen -t rsa -C "你自己的郵箱"
(這里不要設置密碼,直接按回車就可以,以后更新就不需要密碼)
2: id_rsa 這個文件是你的私鑰、id_rsa.pub是你的公共秘鑰,用記事本打開文件id_rsa.pub,把里面的內容復制到github配置ssh
3:添加私秘鑰到ssh: ssh-add id_rsa(如果添加失敗可以先執行命令ssh-agent bash,然后再次添加私秘鑰。)
4: 用ssh -T git@github.com 判斷是否綁定成功。如果返回successfully 表示成功
具體教程看我上一章。