Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub Push failed in Android Studio 3.4.1

Android Studio 3.4.1 Windows 10 git 2.22.0

Craete pub key from Git Gui. Share key in my git account.

I geting errors when I try in Android Studio VCS->Git->Push

Native

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

Built-in

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.
like image 207
Иван Тулаев Avatar asked Oct 23 '25 14:10

Иван Тулаев


1 Answers

I just had the same issue. What fixed it for me going to Settings>Git and enabling "use credential helper".

like image 175
rushrage Avatar answered Oct 25 '25 04:10

rushrage