@atripp I updated my code to use Bearer auth and everything worked great. Thanks for the help.
In my opinion you don't need to return API key authentication, but it would be great to write somewhere that you changed the authorization method.
@atripp I updated my code to use Bearer auth and everything worked great. Thanks for the help.
In my opinion you don't need to return API key authentication, but it would be great to write somewhere that you changed the authorization method.
@atripp yes, very similar to my problem. I'll try tomorrow and get back with feedback.
we connected the proget server to our domain authorization. After that, it became impossible to call a DELETE request for docker blobs due to error 401: Unauthorized: Access is denied due to invalid credentials.
If we enable access for EVERYONE, then deletion is allowed
If I understand correctly, first I need to get a token (call http://proget/v2/_auth) and use it when connecting to the service, but I did not find it in the documentation, where should I specify it?
I tried to specify it in the header as a parameter with name "X-ApiKey" or "token", but still getting error 401. Please help with advice or link to documentation
@atripp @Dan_Woolf thank you both so much!
@Dan_Woolf thank you.
so if I don't find a blob in DockerImageLayers_Extended it can be removed from disk manually ?
@atripp thanks. yes, it works and clean up some blobs from disk.
but I found on the disk a very old blobs that were created more than a year ago. Is it possible to see in the database or through the API where this blobs is used?
we have a custom retention policy. for this purpose, I wrote a program that calls an api to remove docker images from proget. it works in this way
https://proget.server.com/v2/<feed name>/library/<repository name>/manifests/<image tag>
https://proget.server.com/v2/<feed name>/library/<repository name>/manifests/<digest>
and we have a retention Rule customized on a feed
"cached connector packages prerelease packages not requested for 30 days with all package usage removed for more than 30 days from the feed"
What am I doing wrong ? Why aren't blobs being removed from disk?
@atripp
Unfortunately update didn't help.
docker login proget.company.com
Username: Admin
Password:
Error response from daemon: Get https://proget.company.com/v2/: unauthorized: authentication required
@apxltd @ben
Hello, we faced with same problem. Docker can't login to docker repository
docker login proget.company.com
return this message
Error response from daemon: login attempt to https://proget.company.com/v2/ failed with status: 401 Unauthorized
Proget version 5.2.25 (Build 14) . Running in docker container on Centos 7
BaseURL = https://proget.company.com
Nginx config
server {
client_max_body_size 0;
listen 443 ssl;
server_name proget.company.com;
ssl on;
chunked_transfer_encoding on;
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_redirect off;
proxy_buffering off;
proxy_request_buffering off;
proxy_connect_timeout 1m;
proxy_read_timeout 1h;
proxy_send_timeout 1h;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_pass http://intenal.proget;
}
}