简体   繁体   中英

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.

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

在此处输入图片说明

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

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 组织 > 设置 > 关联账户

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 > 构建配置 > 源代码库

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.

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