Android Studio 3.4.1 中 GitHub Push 失败

Ива*_*аев 4 windows android github

Android Studio 3.4.1 Windows 10 git 2.22.0

来自 Git Gui 的 Craete pub 密钥。在我的 git 帐户中共享密钥。

当我在 Android Studio VCS->Git->Push 中尝试时出现错误

本国的

Push failed
            Invocation failed Unexpected Response from Server:  Unauthorized
            java.lang.RuntimeException: Invocation failed Unexpected Response from Server:  Unauthorized
            at org.jetbrains.git4idea.nativessh.GitNativeSshAskPassXmlRpcClient.handleInput(GitNativeSshAskPassXmlRpcClient.java:34)
            at org.jetbrains.git4idea.nativessh.GitNativeSshAskPassApp.main(GitNativeSshAskPassApp.java:30)
            Caused by: java.io.IOException: Unexpected Response from Server:  Unauthorized
            at org.apache.xmlrpc.LiteXmlRpcTransport.sendRequest(LiteXmlRpcTransport.java:231)
            at org.apache.xmlrpc.LiteXmlRpcTransport.sendXmlRpc(LiteXmlRpcTransport.java:90)
            at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:72)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178)
            at org.jetbrains.git4idea.nativessh.GitNativeSshAskPassXmlRpcClient.handleInput(GitNativeSshAskPassXmlRpcClient
Run Code Online (Sandbox Code Playgroud)

内置

Push failed
            Java.io.IOException: Authentication failed:
            at org.jetbrains.git4idea.ssh.SSHMain.authenticate(SSHMain.java:288)
            at org.jetbrains.git4idea.ssh.SSHMain.start(SSHMain.java:162)
            at org.jetbrains.git4idea.ssh.SSHMain.main(SSHMain.java:125)
            Caused by: java.io.IOException: Publickey authentication failed.
            at com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:291)
            at com.trilead.ssh2.Connection.authenticateWithPublicKey(Connection.java:483)
            at org.jetbrains.git4idea.ssh.SSHMain.tryPublicKey(SSHMain.java:341)
            at org.jetbrains.git4idea.ssh.SSHMain.authenticate(SSHMain.java:221)
            ... 2 more
            Caused by: java.io.IOException: PEM problem: it is of unknown type
            at com.trilead.ssh2.crypto.PEMDecoder.decodeKeyPair(PEMDecoder.java:500)
            at com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:225)
            ... 5 more
            Could not read from remote repository.
            Please make sure you have the correct access rights
            and the repository exists.
Run Code Online (Sandbox Code Playgroud)

小智 9

我刚刚遇到了同样的问题。是什么为我修复了这个问题,转到“设置”>“Git”并启用“使用凭据助手”。

  • 它的工作...... (2认同)