jfrog 的 Artifactory 是否能够作为远程连接到 conan_server? 您可以在下面看到请求,conan 客户端使用这些请求对 conan_server 进行身份验证正确授权:Artifactory 尝试进行身份验证:服务器的回答:

问题描述

我们拥有什么:

  • conan_server,版本 1.35.0
  • Artifactory cpp-ce 版本 7.17.5

我们想要什么:

将 conan_server 作为远程添加到 Artifactory。

我们的工作:

在 Artifactory 中创建新的遥控器,然后使用 100% 正确的服务器名称和凭据(用户名和密码)进行设置。

我们得到了什么:

Artifactory 无法向 conan_server 进行身份验证。

您可以在下面看到请求,conan 客户端使用这些请求对 conan_server 进行身份验证(正确授权):

一、基本认证

GET /v1/users/authenticate HTTP/1.1
Host: serverhost:9300
User-Agent: Conan/1.31.3 (Python 3.6.9) python-requests/2.25.0
Accept-Encoding: gzip,deflate
Accept: */*
Connection: keep-alive
X-Client-Anonymous-Id: e468058b6da56d6c83463a5695d2e72f40bf457e
X-Client-Id: demo
Authorization: Basic ***********

带有令牌的响应:

HTTP/1.0 200 OK
Date: Thu,08 Apr 2021 08:45:46 GMT
Server: WsgiServer/0.2 cpython/3.5.3
Content-Length: 124
Content-Type: text/plain

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoiZGVtbyIsImV4cCI6MTYxNzg3ODc0Nn0.aZJlLSPXIzHKfX_zohmxf0wO990RHjDzMer1yDoyviA
clienthost - - [08/Apr/2021 11:45:46] "GET /v1/users/authenticate HTTP/1.1" 200 124

然后使用token进行授权:

GET /v2/conans/search HTTP/1.1
Host: serverhost:9300
User-Agent: Conan/1.31.3 (Python 3.6.9) python-requests/2.25.0
Accept-Encoding: gzip,deflate
Accept: */*
Connection: keep-alive
X-Client-Anonymous-Id: e468058b6da56d6c83463a5695d2e72f40bf457e
X-Client-Id: demo
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoiZGVtbyIsImV4cCI6MTYxNzg3ODc0Nn0.aZJlLSPXIzHKfX_zohmxf0wO990RHjDzMer1yDoyviA

Artifactory 尝试进行身份验证:

GET /v2/conans/search HTTP/1.1
Connection: Keep-Alive
X-Artifactory-Originated: c16481e7214b64d1:5326f2e9:178b18bceca:-8000
Origin-Artifactory: c16481e7214b64d1:5326f2e9:178b18bceca:-8000
Accept-Encoding: gzip
uber-trace-id: e86d87a0be0ac1f4:e86d87a0be0ac1f4:e86d87a0be0ac1f4:0
Host: serverhost:9300
User-Agent: Artifactory/7.11.5 71105900
Authorization: Basic ZGVtbzpkZW1v

服务器的回答:

HTTP/1.0 401 Unauthorized
Date: Thu,08 Apr 2021 13:25:21 GMT
Server: WsgiServer/0.2 cpython/3.5.3
Content-Length: 37
Content-Type: text/html; charset=UTF-8

'Http Authentication not implemented'

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)