How to fix Invocation failed Unexpected Response from Server: Unauthorized in Android studio

后端 未结 6 1157

I have one project on Gitlab and I worked with it for the last few days!

Now i want pull project on my home PC but show me below error :

相关标签:
6条回答
  • 2021-01-31 15:16

    You can try this, don't use the shortcut(git@github.com:/example/example.git) provided by logging in to git, submit directly using the full repo address(https://github.com/example/example.git).

    0 讨论(0)
  • 2021-01-31 15:24

    Enabling credentials helper worked for me, using Android Studio 3.6.2 on Windows 10

    AndroidStudio -> File -> Settings -> Git -> Use credential helper

    0 讨论(0)
  • 2021-01-31 15:28

    file->setting->git-> SSH executable: dropdown, choose built in

    0 讨论(0)
  • 2021-01-31 15:35

    I had the same issue. Fixed it by adding SSH private key to the ssh-agent in the command line:

    $ ssh-add -K ~/.ssh/id_rsa
    

    Also, check if Git settings are set to Native

    Settings --> Version Control --> Git in the SSH executable: dropdown, choose Native

    EDIT It was fixed in the latest version 3.6.1 of Android Studio https://androidstudio.googleblog.com/2020/02/android-studio-361-available.html

    0 讨论(0)
  • 2021-01-31 15:36

    Managed to fix it like this:

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

    Edit: this is for Android Studio 3.4, for 3.6 Volodymyr has an answer below.

    0 讨论(0)
  • 2021-01-31 15:37

    This Error seems to appear if your SSH Key Pair is secured with a password

    The native SSH Executebale can not prompt you for your password in Android Studio afaik, so authentication will fail if the credentials are not provided otherwise.

    Using the Built-in SSH Executable will let you enter your password via a prompt in Android studio.

    The Answer provided by Adrian worked perfectly for me.

    0 讨论(0)
提交回复
热议问题