简体   繁体   English

适用于 iOS 的 Azure DevOps 管道 - Fastlane 匹配克隆问题

[英]Azure DevOps Pipeline for iOS - Fastlane Match Clone Problem

I'm trying to implement iOS pipeline to Azure DevOps using Fastlane.我正在尝试使用 Fastlane 实现到 Azure DevOps 的 iOS 管道。 I have already have Fastlane in my project and successfully deploy beta and pilot versions.我的项目中已经有 Fastlane 并成功部署了测试版和试用版。 My problem is that when I run below script on Azure pipeline, It can't pass match clone part.我的问题是,当我在 Azure 管道上运行以下脚本时,它无法通过match克隆部分。 Therefore, can't fetch certificates, provision profiles etc..因此,无法获取证书、配置文件等。

PS: iOS_Certificates repo is different than project repo. PS:iOS_Certificates 存储库与项目存储库不同。

I'm getting timeout error after 1 hour. 1 小时后我收到超时错误。 I think It is about authentication to我认为这是关于身份验证

pool:
  vmImage: 'macos-latest'

steps:
- script: |
    fastlane match development --clone_branch_directly --verbose
    fastlane beta
  displayName: 'Build iOS'

Related code in MatchFile: MatchFile 中的相关代码:

git_url("git@ssh.dev.azure.com:v3/myteam/myproject/certificates_repo")
storage_mode("git")
type("development")

EDIT: I'm trying to fetch a repo inside same project inside Azure DevOps (not GitHub or somewhere else).编辑:我试图在 Azure DevOps(不是 GitHub 或其他地方)内的同一个项目中获取一个 repo。 I'm getting timeout error, so no specific error even I run --verbose on match command.我收到超时错误,所以即使我在 match 命令上运行--verbose也没有特定错误。

From your information, you are using the SSH key as the authentication method.根据您的信息,您正在使用 SSH 密钥作为身份验证方法。

Since you are using the macos-latest (microsoft-hosted agent) as build agent, the private key of ssh key will not exist on the target build machine.由于您使用的是macos-latest (microsoft-hosted agent)作为构建代理,ssh 密钥的私钥在目标构建机器上将不存在。

So it can't authenticate and gets stuck.所以它无法进行身份验证并被卡住。 As you said, it will run 60 minutes and cancel.正如您所说,它将运行 60 分钟并取消。 I could also reproduce this issue.我也可以重现这个问题。

You could try to create a self-hosted agent and run the build on it.您可以尝试创建一个自托管代理并在其上运行构建。

In this case, you need to ensure that the private key exists on the machine, then you could authenticate through the ssh key.在这种情况下,您需要确保私钥存在于机器上,然后您才能通过 ssh 密钥进行身份验证。

On the other hand, you can authenticate with username and password.另一方面,您可以使用用户名和密码进行身份验证。

For example(matchfile):例如(匹配文件):

git_url "https://organizationname@dev.azure.com/organizationname/projectname/_git/reponame" 
type "development" 
app_identifier 'xxx'
username "member@companyname.com" #This will be the git username
ENV["FASTLANE_PASSWORD"] = "abcdefgh" #Password to access git repo.
ENV["MATCH_PASSWORD"] = "password" #Password for the .p12 files saved in git repo.

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

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