4

Environment:

OS: Ubuntu 18.04
Concourse:  3.14.0

Server is behind proxy. Concourse installation is binary, non-docker. Proxy has been setup in /etc/environment as:

> http_proxy="http://proxy01.localnet.local:8080/"
> https_proxy="http://proxy01.localnet.local:8080/"

In that server, I can successfully access outside:

$ git clone https://github.com/pivotal-cf/pcf-pipelines
Cloning into 'pcf-pipelines'...
remote: Counting objects: 20990, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 20990 (delta 13), reused 22 (delta 8), pack-reused 20953
Receiving objects: 100% (20990/20990), 25.70 MiB | 8.46 MiB/s, done.
Resolving deltas: 100% (11497/11497), done.

Error:

resource script '/opt/resource/check []' failed: exit status 128

stderr:
Cloning into '/tmp/git-resource-repo-cache'...
ssh: connect to host github.com port 22: Operation timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

That's it. I can't find anything that can lead me to troubleshoot the environment.

Any feedback is greatly appreciated!!

user2362699
  • 586
  • 6
  • 22

3 Answers3

1

Not knowing your git resource's source config, I bet that you're missing the private_key field there. With SSH urls, you always have to authenticate with a private key -- no such thing as anonymous git access. Anonymous access does exist over HTTPS, though, so that's why it fixed the problem.

Josh Ghiloni
  • 1,260
  • 8
  • 19
  • I am having the same setup and same issue, but I certainly have a `private_key`, which I can see when doing `fly -t concourse get-pipeline -p my-pipeline`. Any idea what else might go wrong here? – Chris Oct 18 '18 at 09:37
0

Answering my own question: In pipelines.yml file I had to modify github URL and change it from

uri: git@github.com:pivotal-cf/pcf-pipelines.git

To this:

uri: https://github.com/pivotal-cf/pcf-pipelines

After that, it started working.

user2362699
  • 586
  • 6
  • 22
0

Recently I encountered this error with a 4XX error code. Turns out it was docker. An engineer had made their fork of a docker image public, so when our docker image was tagged no credentials were being supplied to the build and we were handed a 4XX error with this cryptic useless error message.

If you've recently edited a concourse pipeline with a dockerfile and are seeing this message, check the username and password are supplied and valid (can use docker login from cli or login at https://hub.docker.com. A short-term fix can be to make the image public, but a longer-term fix is to provide credentials to fetch a private image.

MrMesees
  • 1,488
  • 19
  • 27