【问题标题】:Bintray API - Can not obtain OSS licenses as anonymousBintray API - 无法匿名获取 OSS 许可证
【发布时间】:2019-03-26 19:44:21
【问题描述】:

我正在尝试获取 Bintray 支持的所有 OSS 许可证,但似乎 API 已修改且文档未修改。

如果您阅读了 OSS 许可部分:https://bintray.com/docs/api/#_get_oss_licenses

返回所有 OSS 许可证的列表。此资源可供经过身份验证的客户端和匿名客户端使用。”

但是,如果我尝试以匿名方式获取许可证,Bintray 会返回 401(未经授权):

curl -vvv https://api.bintray.com/licenses/oss_licenses
* Trying 75.126.208.206...
* TCP_NODELAY set
* Connected to api.bintray.com (75.126.208.206) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* NPN, negotiated HTTP1.1
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Next protocol (67):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: CN=*.bintray.com
*  start date: Sep 15 00:00:00 2018 GMT
*  expire date: Nov  9 12:00:00 2019 GMT
*  subjectAltName: host "api.bintray.com" matched cert's "*.bintray.com"
*  issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=GeoTrust RSA CA 2018
*  SSL certificate verify ok.
> GET /licenses/oss_licenses HTTP/1.1
> Host: api.bintray.com
> User-Agent: curl/7.64.0
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Server: nginx
< Date: Tue, 26 Mar 2019 19:28:56 GMT
< Content-Type: application/json
< Content-Length: 51
< Connection: keep-alive
< WWW-Authenticate: Basic realm="Bintray API Realm"
<
* Connection #0 to host api.bintray.com left intact
{"message":"This resource requires authentication"}

我认为不需要身份验证,因为我没有更改任何内容。 是错误还是文档已过时?

问候!

【问题讨论】:

  • 您是否尝试获得 Bintray 的支持?我相信他们可以提供帮助。
  • 我向 support@jfrog.com 发送了一封电子邮件,但一个机器人回复了我:“感谢您联系 JFrog 支持。我们的记录并未将您列为活跃的 JFrog 用户。基于 SLA 的支持服务或访问支持门户,以及错误修复、维护和升级,仅提供给具有有效订阅的 JFrog 用户。”如果我访问支持页面 (jfrog.com/support),则只有 3 个选项,客户票务门户(我不是客户)、知识库(没有帮助)和开源用户论坛 (StackOverflow)。跨度>

标签: bintray


【解决方案1】:

正如您还提到的,此 REST 可以使用经过身份验证的用户和匿名用户运行。 看起来有一个错误(在 JFrog 的 JIRA 中记录为 内部 - JBT-2948)

你现在应该可以匿名运行了(见下面的截图)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-03-04
    • 2020-04-03
    • 2013-10-04
    • 2021-10-18
    • 2018-04-30
    • 1970-01-01
    • 2015-09-08
    • 1970-01-01
    相关资源
    最近更新 更多