Concourse git resource fails check with "fatal: Could not read from remote repository."
search cancel

Concourse git resource fails check with "fatal: Could not read from remote repository."

book

Article ID: 401141

calendar_today

Updated On: 06-16-2025

Products

Concourse for VMware Tanzu

Issue/Introduction

When attempting to run a pipeline or check a resource in concourse, you may see see the following error when attempting to check a git resource:

selected worker: <worker-guid>
Identity added: /tmp/private-key.pem (example.com)
Cloning into '/tmp/<folder>'...
fatal: Could not read from remote repository.

This results in the resource never being checked successfully. 

Cause

This happens when your pipeline is trying to pull a resource down from Github, but cannot establish the connection using the provided key. There are two main reasons for this:

  1. The private key is invalid for the targeted repo
  2. The concourse worker can't establish the connection to github.

Resolution

A good command for testing that both the key and the connection can reach the repo is:

GIT_TRACE=1  GIT_SSH_COMMAND="ssh -v -i key.pem" git clone git@github.com:<target>

You'll need to run this from the concourse container. Steps on how to access the container can be found in this article.

The above command will give more info on where the connection is stuck. If it seems to hang, let it run for 10-20 minutes. It may fail with:

kex_exchange_identification: read: Connection timed out

This points to the connection from the worker to the repo as the issue. You will need to engage your networking team to determine what the issue is.

If you see a different output, or still face issues, please raise a case with Broadcom support.