【问题标题】:Bintray Debian Repository Creation and Upload file using APIBintray Debian 存储库创建和使用 API 上传文件
【发布时间】:2017-08-04 22:47:34
【问题描述】:

我正在按照 Debian repository on Bintray multiple errors and unexpected behavior

但是,我的 Bintray Debian 文件上传尝试仍然失败:

{"message":"Unable to upload files: Debian distribution, component and architecture were not found on repo and were not specified"}

这是我的 curl 命令:

curl -T libterm-screencolor-perl_1.09-1_all.deb -umyid:mybintraykey https://api.bintray.com/content/myid/myrepo/libterm-screencolor-perl/1.09-1/pool/main/l/libterm-screencolor-perl_1.09-1_all.deb;deb_distribution=all;deb_component=main;deb_architecture=i386,amd64;override=1

基本上我得到了完全相同的错误 Debian repository on Bintray multiple errors and unexpected behavior 出于完全相同的原因。

所以我决定从头开始,首先创建 Bintray Debian 存储库,via API
这是我的代码:

curl -umyid:mybintraykey https://api.bintray.com/repos/myid/deb -d '{"name":"deb","type":"debian","default_debian_architecture":"amd64","default_debian_distribution":"all","default_debian_component":"main","private":false,"desc":"This repo...","business_unit":"businessUnit1","labels":["label1","label2"],"gpg_sign_metadata":false,"gpg_sign_files":false,"gpg_use_owner_key":false}'

我没有收到错误,但也没有响应。当我从 Bintray Web UI 检查时,没有创建存储库。尝试将 "version_update_max_days" : 60 添加到 JSON 也无济于事。

怎么了?

【问题讨论】:

    标签: curl debian bintray


    【解决方案1】:

    上传文件:
    您的curl 命令需要引号,请参阅此answer

    创建存储库:
    您的curl 命令缺少媒体类型,在这种情况下应该是-H "Content-Type: application/json"。在详细模式下运行curl 命令总是好的-v

    您的curl 命令如下所示:

    curl -umyid:mybintraykey https://api.bintray.com/repos/myid/deb -H "Content-Type: application/json" -d '{"name":"deb","type":"debian","default_debian_architecture":"amd64","default_debian_distribution":"all","default_debian_component":"main","private":false,"desc":"This repo...","business_unit":"businessUnit1","labels":["label1","label2"],"gpg_sign_metadata":false,"gpg_sign_files":false,"gpg_use_owner_key":false}' -v
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-10
      • 1970-01-01
      • 2015-10-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-20
      • 1970-01-01
      相关资源
      最近更新 更多