Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suddenly receiving 401 response code #7

Closed
Erikvl87 opened this issue Dec 28, 2019 · 3 comments
Closed

Suddenly receiving 401 response code #7

Erikvl87 opened this issue Dec 28, 2019 · 3 comments

Comments

@Erikvl87
Copy link

Hello Peter,

I have been using your GitHub Action with success in the past; but somehow it broke down (or I broke it 😉). I have a 2FA enabled Docker Hub account and have set DOCKERHUB_PASSWORD secret in GitHub with my account password (not the personal access token, as instructed in your README.md).

The response I am receiving:

Acquiring token
Sending PATCH request
Received response code: 401
##[error]Docker run failed with exit code 1

Link to a successful run 6 weeks ago: action
Link to an unsuccessful run today: action

Could you help me resolve the issue? I suspect there is something wrong in the API communication since I haven't made any changes to the Github Action .yml file.

@peter-evans
Copy link
Owner

Hi @Erikvl87

This is due to recent changes by Docker Hub. As mentioned in this issue, it seems that not only have Personal Access Tokens stopped working, but the new 2FA feature also does not allow this type of access (which makes sense). I will update the README to make it more clear.

Unfortunately, there is no good solution at the moment until Docker Hub allow Personal Access Tokens to be used with the particular API in use by this action. The only option right now is to disable 2FA if you want to use this action.

@Erikvl87
Copy link
Author

Ah, thanks @peter-evans. It does make sense indeed, although I do not feel too comfortable to compromise on security by disabling 2FA (which is kind of ironic in this case 😄).

I think I will revert back to manually updating the Docker Hub Description and wait for scope support on tokens to allow other APIs, as mentioned in the referenced issue. Hope they will do that soon, so I can use your action again.

@peter-evans
Copy link
Owner

Sorry I can't be more help at the moment. Hope they add scopes for the API soon.

I'll close this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants