Git报错Push failed:Invocation failed Server returned invalid Response.

在IDEA中使用git进行代码管理时,无法将代码push到github,报错如下:


版权声明:本文为博主原创文章,禁止转载
作者博客:codesong.cn
created: 2020-03-23


Push failed
        Invocation failed Server returned invalid Response.
        java.lang.RuntimeException: Invocation failed Server returned invalid Response.
        at org.jetbrains.git4idea.http.GitAskPassXmlRpcClient.askUsername(GitAskPassXmlRpcClient.java:50)
        at org.jetbrains.git4idea.http.GitAskPassApp.main(GitAskPassApp.java:64)
        Caused by: java.io.IOException: Server returned invalid Response.
        at org.apache.xmlrpc.LiteXmlRpcTransport.sendRequest(LiteXmlRpcTransport.java:242)
        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.http.GitAskPassXmlRpcClient.askUsername(GitAskPassXmlRpcClient.java:47)
        ... 1 more
        remote: No anonymous write access.
        Authentication failed for 'https://github.com/codeso... (show balloon)

解决方法

重新设置git的用户名和邮箱
git config --global user.name "username"
git config --global user.email "email"

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容