version-checker
version-checker copied to clipboard
Wrong url path for token in selfhosted client
Hello,
I deployed version-checker with enabled self hosted registry (artifactory), but I got 405 error in the log (sensitive info replaced with stars):
error: failed to setup image registry clients: failed to create selfhosted client "https://*****": failed to setup token auth (405): { "errors" : [ { "status" : 405, "message" : "Method Not Allowed" } ] }
It seems that selfhosted client in the version-checker has wrong token url path for artifactory because in official documentation it is different.
I tested it with curl and got the same result:
$ curl -u*** -XPOST "https://***/v2/token" -d "username=***"
{ "errors" : [ { "status" : 405, "message" : "Method Not Allowed" } ] }
With correct url path it works:
$ curl -u*** -XPOST "https://***/artifactory/api/security/token" -d "username=***"
{ "scope" : "applied-permissions/groups:*** api:*", "access_token" : "***", "expires_in" : 3600, "token_type" : "Bearer" }
Thanks @kashtan404,
Is this using a selfhosted instance of Jfrog, or the cloud hosted solution?
Hi @JoshVanL, It's self-hosted instance of Jfrog.
@kashtan404 did you manage to integrate the JFrog Artifactory with the version checker?