We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Expected Behaviour The docker auth password should not be truncated if it contains a :
:
Actual Behaviour The docker auth password is truncated if it contains a :
eg. If the password is password1:1 it will be reduced to password1.
password1:1
password1
Testcontainer Logs Since the password is truncated, it ends up producing the unauthorized error:
unauthorized
testcontainers [ERROR] Failed to pull image "testcontainers/ryuk:0.5.1": Error: (HTTP code 500) server error - Head "https://registry-1.docker.io/v2/testcontainers/ryuk/manifests/0.5.1": unauthorized: incorrect username or password
Steps to Reproduce
~/.docker/config.json
Code You can clearly see in the code it is currently doing a naive string split on :
https://github.com/testcontainers/testcontainers-node/blob/main/packages/testcontainers/src/container-runtime/auth/auths.ts#L24
A simple fix could be something like this:
const [username, ...passwordParts] = decodedAuth.split(":"); const password = passwordParts.join(":");
I will raise a PR.
The text was updated successfully, but these errors were encountered:
Thanks @cristianrgreco. When will a new build be available with this fix?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Expected Behaviour
The docker auth password should not be truncated if it contains a
:
Actual Behaviour
The docker auth password is truncated if it contains a
:
eg. If the password is
password1:1
it will be reduced topassword1
.Testcontainer Logs
Since the password is truncated, it ends up producing the
unauthorized
error:Steps to Reproduce
:
)~/.docker/config.json
Code
You can clearly see in the code it is currently doing a naive string split on
:
https://github.com/testcontainers/testcontainers-node/blob/main/packages/testcontainers/src/container-runtime/auth/auths.ts#L24
A simple fix could be something like this:
I will raise a PR.
The text was updated successfully, but these errors were encountered: