我正在尝试在我的私有注册表中列出存储库,但是出于未知原因,轮询/v2/_catalog
不会返回任何结果,无论如何指定回购 都会返回结果。 / p>
我也可以毫无问题地推入该仓库,所以我很沮丧。
// Doesn't work =>
curl -kv -X GET https://registry.example.com/v2/_catalog --user user:pass
// Does Work =>
curl -kv -X GET https://registry.example.com/v2/nginx/tags/list --user user:pass
卷曲请求失败的输出是:
* Trying 000.000.000.000...
* TCP_NODELAY set
* Connected to registry.example.com (000.000.000.000 port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* 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, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: O=Acme Co; CN=Kubernetes Ingress Controller Fake Certificate
* start date: Feb 13 16:27:49 2019 GMT
* expire date: Feb 13 16:27:49 2020 GMT
* issuer: O=Acme Co; CN=Kubernetes Ingress Controller Fake Certificate
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Server auth using Basic with user 'user'
* Using Stream ID: 1 (easy handle 0x7f83b1800400)
> GET /v2/_catalog HTTP/2
> Host: registry.example.com
> Authorization: Basic asdfasdfasdfasdfasdfasdfa
> User-Agent: curl/7.54.0
> Accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 502
< server: nginx/1.15.8
< date: Wed, 13 Feb 2019 17:27:17 GMT
< content-type: text/html
< content-length: 157
< strict-transport-security: max-age=15724800; includeSubDomains
<
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.15.8</center>
</body>
</html>
* Connection #0 to host registry.example.com left intact
答案 0 :(得分:0)
我也在寻找这个问题的答案,
I am trying to get list of repository on jfrog Docker local repository through v2/_catalog.
let say repository name: devops and image:mongo:3.6
jfrog registry url : http://192.168.19.99:8081
GET API is : curl -k -u test:123test123 -X GET http://192.168.19.99:8081/v2/_catalog
**Response returns empty**
However if put repository name after **v2/reponame/_catalog** then getting correct list of image
belongs to given repository.
e.g: curl -k -u test:123test123 -X GET http://192.168.19.99:8081/v2/devops/_catalog
{
"repositories" : [ "mongo" ]
}
But i am looking to get through **v2/_catalog**
If there any way to make it work using **v2/_catalog**
However i also tried with Nginx configuration but **v2/_catalog** returns empty ONLY
--
Thanks ```