简体   繁体   English

Docker Hub Registry 无法从 Github 存储库构建 docker 镜像

[英]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)两天以来,我不知道为什么,我无法从Docker Hub Registry使用链接的 github 项目构建 docker 映像(以前可以使用)

Many answers were about a github submodule It was not my case.许多答案都是关于github 子模块的。这不是我的情况。

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.看起来 Docker 已经改变了他的应用程序的名称。 Rename from Docker Hub Registry to Docker Hub BuilderDocker Hub Registry重命名为Docker Hub Builder

For repair it, so I cut the application link between Docker and Github.为了修复它,所以我切断了 Docker 和 Github 之间的应用程序链接。 And re-create the link.并重新创建链接。

It added me an application for authorization in Github, the proof in image width Docker Hub Builder它在 Github 中为我添加了一个授权应用程序,图像宽度的证明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.对我来说,在 Docker-Hub 上单击 GitHub 帐户的重新链接按钮解决了问题。

You can re-link in this page: https://hub.docker.com/settings/linked-accounts您可以在此页面重新链接: 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.首先,尝试将您的 GitHub 帐户重新链接到 Docker Hub检查您的 GitHub 组织的“第三方应用程序访问策略” ,如之前的答案所建议的那样。

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 存储库归某个组织所有,请访问该组织的Linked Accounts设置并尝试重新链接提供者:

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 存储库 > Builds > Configure Automated Builds ,然后查看Source repository列表:

Docker Hub > 构建配置 > 源代码库

This will show you which repositories Docker Hub has access to.这将显示 Docker Hub 可以访问哪些存储库。

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.就我而言,列表中缺少一些存储库,因为 Docker Hub 只能看到链接的 GitHub 帐户具有管理员访问权限的存储库。

Conclusion: the GitHub account linked with Docker Hub needs admin access to the relevant GitHub repository .结论:与 Docker Hub 链接的 GitHub 帐户需要对相关 GitHub 存储库的管理员访问权限

Giving the GitHub account admin access to the relevant repository fixed my Docker Hub builds.授予GitHub 帐户管理员访问相关存储库的权限修复了我的 Docker Hub 构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM