简体   繁体   English

无法在 android studio 3.6 中 git pull

[英]Not able to git pull in android studio 3.6

I am getting error as mentioned below:我收到如下错误:

Update 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(GitNat更新失败调用失败来自服务器的意外响应:未经授权的 java.lang.RuntimeException:调用失败来自服务器的意外响应:在 org.jetbrains.git4idea.nativessh.GitNativeSshAskPassXmlRpcClient.handleInput(GitNativeSshAskPassXmlRpcClient.java.4idea.34) 未经授权nativessh.GitNativeSshAskPassApp.main(GitNativeSshAskPassApp.java:30) 引起:java.io.IOException:来自服务器的意外响应:在 org.apache.xmlrpc.LiteXmlRpcTransport.sendRequest(LiteXmlRpcTransport.java:231) 在 org. .LiteXmlRpcTransport.sendXmlRpc(LiteXmlRpcTransport.java:90) 在 org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:72) 在 org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194) 在 org. xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185) 在 org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178) 在 org.jetbrains.git4idea.nativessh.GitNativeSshAskPassXmlRpcClient.handleInput(GittNa

In previous versions, I managed to fix it like this:在以前的版本中,我设法像这样修复它:

AndroidStudio -> Preferences -> Git -> SSH Executable and changed from Native to Built-in and it started working. AndroidStudio -> Preferences -> Git -> SSH Executable 并从 Native 更改为 Built-in 并开始工作。 See UI here: https://i.stack.imgur.com/KCvHA.png在此处查看用户界面: https : //i.stack.imgur.com/KCvHA.png

But in android studio 3.6, I don't see above option in settings.但是在 android studio 3.6 中,我在设置中看不到上述选项。

在此处输入图片说明

I have also tested the git using Test button at top right.我还使用右上角的测试按钮测试了 git。 Git is executing successfully. Git 正在成功执行。

在此处输入图片说明

This issue is resolved in Android Studio 3.6.1.此问题已在 Android Studio 3.6.1 中解决。 I verified it by updating from 3.6 to 3.6.1 and git is working as expected我通过从 3.6 更新到 3.6.1 来验证它并且 git 按预期工作

You can find release notes here .您可以在此处找到发行说明。 It says它说

Git version control authentication issue resolved已解决 Git 版本控制身份验证问题

In the initial release of Android Studio 3.6, operations requiring authentication in Git version control were broken in the IDE.在 Android Studio 3.6 的初始版本中,需要在 Git 版本控制中进行身份验证的操作在 IDE 中被破坏。 This bug has been fixed in 3.6.1.此错误已在 3.6.1 中修复。 See Issue #124680708 for more information.有关更多信息,请参阅问题 #124680708。

Go to -去 -

Android Studio -> Setting-> GitHub

If you can't login using username and password try to get a Token from GitHub from here -如果您无法使用用户名密码登录,请尝试从此处从GitHub获取令牌-

https://github.com/settings/tokens/new https://github.com/settings/tokens/new

and then generate new token if you don't have one.如果你没有,然后生成新的令牌。 And finally login with Token最后用Token登录

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM