python-artifactory icon indicating copy to clipboard operation
python-artifactory copied to clipboard

Deploying using access_token does not yield same result as with curl, namely in the "Deployed By" Field in Artifactory

Open zshehadeh2 opened this issue 9 months ago • 2 comments

Im using version 2.7.0....

When I do: curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
-T text_example.txt
"https:/my-artifactory.mydomain.com/artifactory/path/to/your/text_example.txt"

It correctly used my access token: Image

Using the new way of authentication, leads to my username in the "Deployed by" field as opposed to the token name. return Artifactory( self.url, access_token=token, verify=self.verify, cert=self.cert, )

However, interestingly using the old way with the token, and using the token username, it works as expected. You can get the token username by decoding your JWT and looking for the section that comes after /users/

return Artifactory( self.url, auth=(user, token), verify=self.verify, cert=self.cert, )

zshehadeh2 avatar Mar 19 '25 19:03 zshehadeh2