完成发布期间的 Sourcetree 致命错误 - 致命:无法读取 'https://github.com' 的用户名:设备未配置

Sourcetree fatal error during finish release - fatal: could not read Username for 'https://github.com': Device not configured

我们正在使用 sourcetree,在完成发布期间我们遇到了如下致命错误。它适用于提交、合并、推送。早些时候它也适用于 'finish releases'。

严重:无法读取 'https://github.com' 的用户名:设备未配置

我在 Sourcetree 版本 3.2.1 (225) 中遇到了类似的问题

以下步骤解决了问题:

  1. 转到'Preferences'
  2. Select 选项卡 'Git'
  3. 在第 'Git version' select 'Use system git'
  4. 部分
  5. 新 window(找到您的系统 git 可执行文件)打开。 Select 'git' 然后点击打开。

这解决了我的问题。

2022 年 2 月 5 日更新

如果有人在 Android Studio 中仍然面临这个问题 去 VCS-> GIT -> 遥控器 编辑原点并将 url 替换为 :

https://<username>@github.com/<username>/<repo>.git

这对我有用!!

对于 Android 工作室,

转到 Android Studio --> 首选项 --> 版本控制 --> Git --> 启用 'Credentials Helper' 选项 .

对我有用!

谢谢!