-
Notifications
You must be signed in to change notification settings - Fork 19
Token Auth Issues #95
Comments
Do you have 2FA enabled? This might be the cause as iirc the node module that is used here, doesn't support it. |
@SISheogorath nope. I had enabled the personal token on one of my repos. I was using a bash script and it errored out. Found your solution and it gave me the verbose answer :). So I’m pretty sure it’s an api issue. Sent with GitHawk |
I don't think those tokens can be user for the API. I would recommend to use a bot account without 2FA instead.
|
Yeah it’s not 2FA just personal token. Just didn’t know if there was a different api call. Sent with GitHawk |
It looks like the https://github.com/RyanTheAllmighty/Docker-Hub-API#setlogintokentoken |
I think that might be the token thats in the .git file but correct me if im wrong |
From the looks of it you use an env var with a token, so it seems like a replacement for the username and password. I think the login function returns a token and the setLoginToken uses a token. The token could be from the login or from the API token. However, I have not seen a working example of it yet. I don't know node yet, but looks like I'm going to learn. |
Ok looks like maybe that is just a JWT that you can get from login or from using a browser and F12. It looks like Docker hub just does not support access token for the admin functions, only user/password. So there is no way to automate and use 2FA. |
So I tried to google-fu this...
but when using the new docker hub token authentication the API doesn't login.
Here is the error when you use an auth token:
The text was updated successfully, but these errors were encountered: