因此,我正试图在Jenkins建立一条渠道,建立形象,并将他们推向Docker Hub。我在Manage‘Jenkins’中的凭据被称为与“docker-Hub-Credentials”相同的凭据,似乎正在使用。
它可以建造,但它只是不能通过推送...帮助?我已经等了好几个小时了,我不确定我错过了什么。
我已经试过使用码头登录,但Jenkins不允许。
stage('Build image') {
/* This builds the actual image; synonymous to
* docker build on the command line */
bat 'docker build -t username/foldername:build . ' }
stage('Push image') {
/* Finally, we'll push the image with two tags:
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
bat 'docker push username/foldername:build'
}
}
我希望这个形象会被推送,但我有这样的想法:
The push refers to repository [docker.io/username/foldername]
a73d7d9f4346: Preparing
964bdfb24a54: Preparing
1af124d739c9: Preparing
6cffeea81e5d: Preparing
614a79865f6d: Preparing
612d27bb923f: Preparing
ef68f6734aa4: Preparing
612d27bb923f: Waiting
ef68f6734aa4: Waiting
denied: requested access to the resource is denied
1条答案
按热度按时间8hhllhi21#
我找到答案了!