在国内使用网络向github进行push等相关操作均可能发生超时问题。
错误提示:
一半都是下面这种提示:
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/827652... (show balloon)
解决方案:
- 换个网络环境,如更换成数据网络或者其他WI-FI。
- Preferences(Mac)/Setting(Win)=>Version Control=>GitHub,然后将Connection timeout从默认5s调整为10s(如果网络环境过于糟糕,可以调高更多。)