Error cloning certificates repo, please make sure you have read access to the repository you want to use

I have a fastlane ci actions. A few days ago, it was ok, but recently I got Error cloning certificates repo, please make sure you have read access to the repository you want to use error when the ci try to clone a private repo which I didn’t changed.

The detailed logs is https://github.com/triple-tree/colorful_classroom_app/runs/938813639.

@liudonghua123,

According to the messages shown in the logs, the certificates you are using for the git clone command does not have the permissions to access the repository you want to clone.

A few days ago, it was ok

Maybe you need to check if the certificate has expired or invalid. You can try to register a new certificate to see if it can work.

  1. If the repository you want to clone in your workflow is hosted on GitHub, generally you can use the checkout action to checkout the repository, and use a personal access token (PAT) or the GITHUB_TOKEN to authenticate on the action:
- name: Checkout
  uses: actions/checkout@v2
  with:
    repository: <repository_name>
    ref: <git_ref>
    token: <PAT_token>
  • if the repository is the one which the current workflow is running in, by default the checkout action will directly use the GITHUB_TOKEN to authenticate.

  • if the repository is another one, you need to create a PAT which has the permissions to access that repository and set the PAT as a secret in the repository which the current workflow is running in. Then you can use this PAT in the workflow to authenticate.

  1. If the repository you want to clone in your workflow is hosted on other platforms or services, you need to use the git clone command with the required certificates. The certificates can be a PAT, a SSH key or other authentications created on these platforms or services.
    Before you use the certificates in your workflows or other CI services, to make sure the certificates can work for the git commands (git clone, git push, etc.), you’d better try it on your local machine at first.

Hi, I have tested and I can confirm that the private repo and github token is no problem. The git clone operation is in fastlane scripts. It is also ok if I run the scripts locally now.
Maybe it was some connectability issue on the github ci environment.

@liudonghua123,

If possible, please share your repository with us, so that we can check more detailed configurations related to the workflow to analyze the root cause.
If your repository is private, you can share an example demo which can reproduce the same problem in a public repository.

@liudonghua123,

How are things going?
Whether the problem still exists on your side?
If so, please your repository with us for further investigation and evaluation. Thanks.

Thanks, I will try to share an example demo which can reproduce the same problem in a public repository.

@liudonghua123,
OK.
Any update, feel free to tell us. Thanks.