Bruno Adelé
Bruno Adelé

Reputation: 1094

Docker Hub Registry cannot build docker image from Github repository

Since two days, i don't know why, i cannot build a docker image from Docker Hub Registry with linked github projects (it's working previously)

Many answers were about a github submodule It was not my case.

Here are the logs

Building in Docker Cloud's infrastructure...
Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
please ensure the correct public key is added to the list of trusted keys for this repository (128)

I tried searching, I did not fall on the answers that not concerned me.

Upvotes: 3

Views: 720

Answers (3)

DMeechan
DMeechan

Reputation: 9070

First, try re-linking your GitHub account to Docker Hub and checking your GitHub org's 'Third party application access policy', as suggested by the previous answers.

If your Docker Hub repository is owned by an organisation, visit the organisation's Linked Accounts settings and try re-linking the provider:

Docker Hub organisation > Settings > Linked Accounts

If that doesn't solve the issue, visit your Docker Hub repository > Builds > Configure Automated Builds, then look at the Source repository list:

Docker Hub > Build configurations > Source repository

This will show you which repositories Docker Hub has access to.

In my case, some repositories were missing from the list because Docker Hub could only see repositories that the linked GitHub account had admin access to.

Conclusion: the GitHub account linked with Docker Hub needs admin access to the relevant GitHub repository.

Giving the GitHub account admin access to the relevant repository fixed my Docker Hub builds.

Upvotes: 0

Mesut GUNES
Mesut GUNES

Reputation: 7401

May someone need this. For me, clicking the re-link button for the GitHub account on the Docker-Hub solved the problem.

You can re-link in this page: https://hub.docker.com/settings/linked-accounts

Upvotes: 2

Bruno Adelé
Bruno Adelé

Reputation: 1094

After many hours of searching, I think found the answer.

I put here the answer, for those who would fall on the same problem.

It looks like Docker have changed is the name of his app. Rename from Docker Hub Registry to Docker Hub Builder

For repair it, so I cut the application link between Docker and Github. And re-create the link.

It added me an application for authorization in Github, the proof in image width Docker Hub Builder

enter image description here

Upvotes: 3

Related Questions