docker-credential-pass does not work with username containing forward-slash
On some docker registries the username is to be supplied as a chain of names each separated by forward-slash. For example oracle cloud registry uses the format <tenancy>/<identityservice>/<username>.
Instead of encrypting this string as base64 and storing it as a single key in the password store, docker-credential-pass stores it as chain of sub-keys. Even though docker login is successful, all subsequent interactions like docker pull fail.
I ran into the same problem - docker-credential-pass breaks when a / is in the username. I see these solutions:
- base64-encode the username, as it is already done with the server url
- replace
/with a placeholder, e.g.-SLASH- - do proper escaping (e.g. replace
/with-, but also escape the escape character,-with--)
I have implemented base64-encoding of the username for me to get it working, but this breaks backwards compability. We could ignore backwards compability. We could also reencode everything that is non-base64 into base64. Still, it might not be the way to go.
The proper-escaping solution is less likely to break backwards compability, but still might, depending upon the escape character.
Just replacing with / with something like -SLASH- would work as long as the replacement never appears in a docker username. -SLASH- is an unlikely candidate, but still not impossible.
Thoughts?
@plakdawa @sebageek any update on this? I'm facing this issue. Login success. But push/pull failing.