
出現這個問題可能需要重新檢查以下方面:
1. Android studio Git 的安裝地址: ..../Git/cmd/git.exe
記得在環境變量 --Path 中進行配置: ,..../Git/cmd
2. ssh 連接 github
進入 git 的安裝目錄下右鍵運行 Git_Bash,然后按照下面博客進行操作
http://blog.csdn.net/binyao02123202/article/details/20130891
3. 在輸入 $ ssh -T git@github.com 命令測試 SSH KEY 時,如果出現以下錯誤:
no such identity: /c/Users/Administrator.PC-201608030926/.ssh/id_rsa.github:
需要在 C:\Users\Administrator.PC-201608030926\.ssh 目錄下添加 config 文件(如果存在的話直接修改)
在 config 文件中添加以下內容(id_rsa 為所生成的 SSH Key 文件名):
Host github.com www.github.com
IdentityFile ~/.ssh/id_rsa
Host git.company.com
IdentityFile ~/.ssh/id_rsa
出現 Permission denied (publickey),是由於多 SSH Key 導致的,也可以通過以上方法設置
4. 將 SSH Key 添加到 github 上
http://blog.csdn.net/vipzjyno1/article/details/22098621
5. ssh-add ~/.ssh/rsa 時報錯:Could not open a connection to your authentication agent
先執行 eval `ssh-agent` (是~鍵上的那個`) 再執行 ssh-add ~/.ssh/rsa成功
ssh-add -l 就有新加的rsa了
