一、概述
我最近在寫一個android的項目。
軟件:android studio、Android studio VCS integration(插件)
Android studio VCS integration插件:使用此插件結合github進行代碼版本管理
近期出現的問題:
19:29:47.581: [DailyZHIHU] git -c core.quotepath=false push --progress --porcelain origin refs/heads/master:master
java.io.IOException: Authentication failed:
at org.jetbrains.git4idea.ssh.SSHMain.authenticate(SSHMain.java:298)
at org.jetbrains.git4idea.ssh.SSHMain.start(SSHMain.java:172)
at org.jetbrains.git4idea.ssh.SSHMain.main(SSHMain.java:137)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
能夠發現,在本地是被提交了的,但是在github上沒有提交成功。結果想在本地check changes/commit的時候,卻是no changes的。
截圖如下:
二、解決辦法
1、首先,確保各項設置全部正確(github連接成功、git.exe連接成功)
2、其次,將SSH executable:Built-in/Native選擇成為Native
關於SSH executable:Built-in/Native的解釋:
Specify the version of SSH to be used with Git.
- Native means that the native SSH will be used.
- Built-in means that the implementation provided by Android Studio will be used.
The native implementation might cause hangups on some platforms. In native case, you also might need to configure ssh-askpass for your platform to receive GUI prompts for passwords.
三、參考
https://bitbucket.org/dmitry_cherkas/jetbrains-bitbucket-connector/issues/20/clone-failed-could-not-read-from-remote
http://www.weixingon.com/s/android+studio+vcs
http://stackoverflow.com/questions/17211697/android-studio-vcs-integration