繁体   English   中英

无法从 Android Studio 4.0 Canary 拉/推 git

[英]Cant pull/push git from Android studio 4.0 canary

每次我尝试从位桶中拉出一个 repo 时,我都会收到错误

 Failed to start Git process User Authentication Token not found

我尝试重置 Windows 凭据,卸载并重新安装 git 和 Android Studio,因为我认为 Android Studio 4.0 和我的使用 Windows 10 的电脑存在兼容性问题。

有任何想法吗?

以下帮助了我:

  1. 从之前版本的目录C:\\Users\\(Your user)\\.AndroidStudio3.(version)\\config (我查了3.5和3.6版本)复制user.token文件。
  2. 将其粘贴到C:\\Users\\(Your user)\\.AndroidStudioPreview4.0\\config
  3. 启动任何需要授权(推/拉)的 git 操作,在出现的窗口中,输入您的授权数据。

这是Google 问题的解决方法。

  1. 关闭 IDE。
  2. 删除 Android Studio 4.0 的设置或将它们复制到其他地方。
  3. 安装3.6 RC 1
  4. 运行它并在 IDE 中执行任何 Git 操作。
  5. 关闭 3.6 并再次打开 4.0 导入先前版本的设置。

你并不孤单。

在 Linux (Android Studio 4.0 Canary 5) 上有同样的问题。 我无法在新项目中“启用版本控制集成”。 我尝试在设置中登录 GitHub(版本控制-> GitHub ),我放置了我的令牌,然后看到了成功......但是当我关闭设置窗口并重新打开它时,我看到了消息“缺少访问令牌”。

编辑:2019-12-21

我想让你幸福。 我找到了以前版本的 Android Studio 的页面。 Git 适用于Android Studio 4.0 Canary 4 ,只需删除您的版本并通过以下链接下载即可。

https://developer.android.com/studio/archive

如果您创建了双因素身份验证,则无法像这样登录,因此请尝试以下操作:

git remote -v 
git remote remove origin 
git remote add origin git@github.com:user/repo.git  

访问这里获取令牌: https : //help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line

暂无
暂无

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

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