在哪里更新Fastlane中的git凭证

时间:2019-03-15 12:26:55

标签: git fastlane

我正在新的Xcode服务器上设置Fastlane。该过程的一部分涉及到远程git repo的推送,该远程git repo目前由于缺少凭据而失败。

我在哪里设置Fastlane的凭据来访问并推送我们的版本?

作为参考,我添加了以下日志:

INFO [2019-03-15 12:23:18.91]: [32m--------------------------------[0m
INFO [2019-03-15 12:23:18.91]: [32m--- Step: push_to_git_remote ---[0m
INFO [2019-03-15 12:23:18.91]: [32m--------------------------------[0m
INFO [2019-03-15 12:23:18.92]: [36m$ pwd[0m
INFO [2019-03-15 12:23:18.93]: ▸ [35m/Users/me/Library/Caches/XCSBuilder/Bots/9c9497a3d0dbcfc749289c0861016c7f/Source/app[0m
INFO [2019-03-15 12:23:18.93]: [36m$ git push origin branch:branch --tags[0m
INFO [2019-03-15 12:23:19.03]: ▸ [35mfatal: could not read Username for 'https://mygithub.com': Device not configured[0m
WARN [2019-03-15 12:23:19.03]: [33m[33mLane Context:[0m
INFO [2019-03-15 12:23:19.03]: {:PLATFORM_NAME=>nil, :LANE_NAME=>"after_integration", :VERSION_NUMBER=>"1.-", :BUILD_NUMBER=>"2"}
ERROR [2019-03-15 12:23:19.03]: [31mExit status of command 'git push origin branch:branch --tags' was 128 instead of 0.
fatal: could not read Username for 'https://mygithub.com': Device not configured
[0m
INFO [2019-03-15 12:23:19.04]: [32mSuccessfully generated documentation at path '/Users/me/Library/Caches/XCSBuilder/Bots/9c9497a3d0dbcfc749289c0861016c7f/Source/app/fastlane/README.md'[0m

+------+---------------------+-------------+
|             [32mfastlane summary[0m             |
+------+---------------------+-------------+
| Step | Action              | Time (in s) |
+------+---------------------+-------------+
| 1    | get_version_number  | 1           |
| 2    | get_build_number    | 0           |
| 3    | commit_version_bump | 2           |
|    | [31mpush_to_git_remote[0m  | 0           |
+------+---------------------+-------------+

ERROR [2019-03-15 12:23:19.04]: [31mfastlane finished with errors[0m

1 个答案:

答案 0 :(得分:0)

这实际上是一个git问题,而不是fastlane问题。 fastlane所做的全部是运行git命令。

好像您使用的是https:// git URL,这意味着您需要设置git凭证帮助程序以从macOS钥匙串中检索密码。 https://help.github.com/en/articles/caching-your-github-password-in-git。保存密码后,快速通道操作将成功完成。