Fastlane Match 使用个人访问令牌和用户名连接失败

Lam*_*our 6 fastlane fastlane-match circleci-2.0

为了获取证书和配置文件,我在连接到私人存储库时遇到了一些麻烦。以下是在 circle-ci 作业/工作流中的 fastlane 通道中运行的一些代码。我想这是可能的,因为这里

username = ENV['USERNAME']
personal_github_access_token = ENV["PERSONAL_GITHUB_ACCESS_TOKEN"]
authorization_token_str = "#{username}:#{personal_github_access_token}"
basic_authorization_token = Base64.encode64(authorization_token_str)

match(
  git_basic_authorization:basic_authorization_token,
  type: "development",
  app_identifier: app_identifiers(),
  readonly: true
)
Run Code Online (Sandbox Code Playgroud)

错误

[12:08:10]: 克隆远程 git repo... [12:08:10]: 如果克隆 repo 时间太长,您可以使用clone_branch_directlymatch 中的选项。克隆到“/var/folders/1b/gl7yt7ds26vcyr1pkgld6l040000gn/T/d20191030-1122-178s7ae”......错误:未找到存储库。致命:无法从远程存储库读取。

请确保您拥有正确的访问权限并且存储库存在。[12:08:10]:退出状态:128 [12:08:10]:克隆证书存储库时出错,请确保您对要使用的存储库具有读取权限[12:08:10]:运行以下命令手动命令以确保您已正确验证:

感谢您的评论和回答。:)

小智 10

如果您使用 OAuth 令牌,请确保您通过 https 而不是 ssh 使用 git。

看看你的Matchfile,应该是git_url("https://github.com/<user>/<repo>.git")而不是git_url("git@github.com:<user>/<repo>.git")

如果需要通过 ssh 使用它,则需要配置 ssh 密钥。


Jos*_*ose 10

在 github 更改开始迫使我使用 github 个人访问令牌后,这对我有用。我正在将我的代码推送到 testflight 进行 beta 测试

git_url("https://github.com/{github_username}/git_repo_name.git")
match(
  git_basic_authorization: Base64.strict_encode64("github_username:github_personal_token"),
  type: "appstore"
)
Run Code Online (Sandbox Code Playgroud)


mne*_*c23 3

我有同样的问题,这对我有用:Base64.strict_encode64

从这里找到解决方案:https ://github.com/fastlane/fastlane/issues/15682