[英]Access to private feed from Azure Devops pipeline
我想从管道(项目 A)创建对我的私人提要的访问,但是每次我尝试运行dotnet restore
以使用来自私人提要的 nugets 恢复 .net 项目(项目 B 中的项目范围提要)时,我得到了
error NU1301: Unable to load the service index for source <<url_to_my_feed>>
我的 pipeline.yml 看起来像:
[previous jobs]
- task: NuGetAuthenticate@0
- task: Docker@2
displayName: Build image
inputs:
command: build
containerRegistry: $(dockerRegistryServiceConnection)
repository: $(contentHostRepositoryName)
Dockerfile: "$(Build.SourcesDirectory)/src/modules/content/src/Dockerfile"
arguments: '--build-arg PAT=$(VSS_NUGET_ACCESSTOKEN)'
tags: |
$(tag)
[next jobs]
我的 dockerfile 看起来像:
...
ARG PAT
RUN dotnet nuget add source <<url_to_my_feed>> --name <<name>> --username <<username>> --password $PAT --store-password-in-clear-text
...
当我将'--build-arg PAT=$(VSS_NUGET_ACCESSTOKEN)'
替换为'--build-arg PAT=<<pat_token>>'
其中<<pat_token>>
是令牌时,我在 Azure 中为我的个人帐户生成手册Devops -everythink 工作正常。
我尝试什么:
Limit job authorization scope to current project for non-release pipelines
,并将Limit job authorization scope to current project for release pipelines
NuGetAuthenticate@0
和NuGetAuthenticate@1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.