[英]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.