我尝试创建一个构建管道,用于将python包上传到Azure DevOps Artifact Feed。对于我的默认供稿,使用此Yaml可以正常运行
- script: |
python setup.py sdist
displayName: 'Make sdist'
- script: |
python setup.py bdist_wheel --universal
displayName: 'Make wheel'
- task: TwineAuthenticate@1
inputs:
artifactFeed: christophhaene
- script: |
cat $(PYPIRC_PATH)
displayName: 'see file'
- script: |
python -m twine upload -r 'christophhaene' --config-file $(PYPIRC_PATH) dist/* --verbose
现在,我想更改供稿。为此,我在名为sftp的DevOps项目中创建了一个新提要,名称为sftp。如果我现在这样更改Yaml:
- task: TwineAuthenticate@1
inputs:
artifactFeed: sftp
- script: |
python -m twine upload -r 'sftp' --config-file $(PYPIRC_PATH) dist/* --verbose
在麻线上传部分,我得到以下错误代码:
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/d8fc4191-edad-4b2c-9393-3e3ddbf716f2.sh
Uploading distributions to https://pkgs.dev.azure.com/christophhaene/_packaging/sftp/pypi/upload
Uploading sftp-0.1.1-py2.py3-none-any.whl
0%| | 0.00/4.43k [00:00<?, ?B/s]
100%|██████████| 4.43k/4.43k [00:00<00:00, 49.8kB/s]HTTPError: 404 Client Error: Not Found - The feed with ID 'sftp' doesn't exist. (DevOps Activity ID: B2DC0264-1FC0-460B-849E-3D77F371E984) for url: https://pkgs.dev.azure.com/christophhaene/_packaging/sftp/pypi/upload
Content received from server:
{"$id":"1","innerException":null,"message":"The feed with ID 'sftp' doesn't exist.","typeName":"Microsoft.VisualStudio.Services.Feed.WebApi.FeedIdNotFoundException, Microsoft.VisualStudio.Services.Feed.WebApi","typeKey":"FeedIdNotFoundException","errorCode":0,"eventId":3000}
##[error]Bash exited with code '1'.
有什么主意吗?
非常感谢 克里斯托夫
答案 0 :(得分:0)
这应该是我们这方面的问题。我已检查并在您的组织机构sftp
中存在提要christ***ene
。
此外,在使用您提供的活动ID 检查了相应的日志后,服务器使用的供稿访问URL非常异常:*****/Ade41224c-3ad6-*****-5f24cb2da86a/_apis/Packaging/Feeds/sftp
。
通常,用于获取提要的api应该由{org name/id}/apis/packaging/Feeds/{feed name/id}
组成。但是,此ID Ade41224c-3ad6-*****-5f24cb2da86a
不是此org(christ***ene
)ID之一,而是您的收款/帐户ID。这会导致此供稿访问失败。
请去我们的official community举起这张票。然后,我们可以邀请我们的产品小组来处理此问题。出票时,请同时共享您的组织名称,项目名称和管道定义名称(出于安全考虑,请选择仅由Microsoft查看,以在评论中共享它。强>)。另外,不要错过这个activity id
,这对于从后端检查日志非常重要。