AS与Pycharm git push报错:Invocation failed Server returned invalid Response, Authentication failed

文章目录

  • Android Studio git报错及解决方法
    • Invocation failed Unexpected Response from Server: Unauthorized
  • Pycharm git push报错及解决方法
    • Push failed: Unable to access 'https://github.com/BierOne/bottom-up-attention-vqa.git/': Could not resolve host: github.com
    • Push failed Invocation failed Server returned invalid Response. Authentication failed for
  • 参考链接

Android Studio git报错及解决方法

Android Studio毕竟和Pycharm一家,不过网上查找到的这个问题关于AS的解决方法倒是挺多,这里简单提一下。

Invocation failed Unexpected Response from Server: Unauthorized

解决方法:

AndroidStudio -> Preferences -> Git -> SSH Executable and changed from Native to Built-in and it started working.

原因:SSH key pair对密码的保护,如果选择native的ssh executable 则AS并不提示你输入密码,所以最后认证会失败。但是如果设置了built-in,则会提示输入密码,这样就认证成功了。

Pycharm git push报错及解决方法

Push failed: Unable to access ‘https://github.com/BierOne/bottom-up-attention-vqa.git/’: Could not resolve host: github.com

解决方法及原因:

这个报错很明显是网络问题,建议重新连接一下网络,一般在这个位置能正常显示头像,即网络没有问题了。
AS与Pycharm git push报错:Invocation failed Server returned invalid Response, Authentication failed_第1张图片

Push failed Invocation failed Server returned invalid Response. Authentication failed for

解决方法及原因:因为我的pycharm中并没有built-in选项,所以AS的方法就不适用了。我的解决措施是在Git栏勾选Use credential helper,就是身份认证助手:
AS与Pycharm git push报错:Invocation failed Server returned invalid Response, Authentication failed_第2张图片
这样在认证的时候就会提示你输入密码了,即可正常通过身份验证。另外还有其他的解决方法,不过都大同小异。

另外,也可以试着在添加github账号的时候使用token,应该可以一劳永逸:

在github官网账户的settings page下选择create new token,然后复制即可

参考链接

  1. https://stackoverflow.com/questions/22348093/pycharm-github-push-failed-fatal-authentication-failed
  2. https://askubuntu.com/questions/436610/intellij-unable-to-fetch-from-git
  3. https://stackoverflow.com/questions/55783219/how-to-fix-invocation-failed-unexpected-response-from-server-unauthorized-in-an

你可能感兴趣的:(AS与Pycharm git push报错:Invocation failed Server returned invalid Response, Authentication failed)