无法构建:获取https://registry-1.docker.io/v2/microsoft/aspnetcore/manifests/1.1:未授权:用户名或密码不正确

前端之家收集整理的这篇文章主要介绍了无法构建:获取https://registry-1.docker.io/v2/microsoft/aspnetcore/manifests/1.1:未授权:用户名或密码不正确前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我的aspnetcore docker项目构建,但是当我单击Docker按钮(或按F5)运行时,我得到了

Severity    Code    Description Project File    Line    Suppression State
Error   MSB4018 The "PrepareForLaunch" task Failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose1627893588_default" with the default driver
Building pswebapi
Service 'pswebapi' Failed to build: Get https://registry-1.docker.io/v2/microsoft/aspnetcore/manifests/1.1: unauthorized: incorrect username or password.

For more troubleshooting information,go to http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose1627893588_default" with the default driver
Building pswebapi
Service 'pswebapi' Failed to build: Get https://registry-1.docker.io/v2/microsoft/aspnetcore/manifests/1.1: unauthorized: incorrect username or password
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.DotNet.Docker.DockerComposeClient.IoUs location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.DotNet.Docker.DockerWorkspace.IoUs location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.dio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets  192 

我有C:使用Docker设置共享.
我正在使用linux容器

Dockerfile是

FROM microsoft/aspnetcore:1.1
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet","PsWebApi.dll"]

我正在研究Scott Allen的Pluralsight课程
“Microsoft Azure for .NET开发人员 – 构建安全的服务和应用程序”

我已升级到最新的nuget包.

最佳答案
用户ID和用于登录dockerhub的电子邮件是两回事.一个人需要id来获取图像.通过做一个两者之间的变化

>码头注销

然后在命令行上

> docker登录

并使用您的ID登录(可以在您使用电子邮件登录后在docker站点上找到).

系统将提示您输入凭据.并且对于用户名,请勿使用电子邮件地址.

原文链接:https://www.f2er.com/docker/435994.html

猜你在找的Docker相关文章