简体   繁体   中英

Azure DevOps Pipeline for iOS - Fastlane Match Clone Problem

I'm trying to implement iOS pipeline to Azure DevOps using Fastlane. I have already have Fastlane in my project and successfully deploy beta and pilot versions. My problem is that when I run below script on Azure pipeline, It can't pass match clone part. Therefore, can't fetch certificates, provision profiles etc..

PS: iOS_Certificates repo is different than project repo.

I'm getting timeout error after 1 hour. 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:

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). I'm getting timeout error, so no specific error even I run --verbose on match command.

From your information, you are using the SSH key as the authentication method.

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.

So it can't authenticate and gets stuck. As you said, it will run 60 minutes and cancel. 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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