Repository navigation
Fix Bundler credentials for usernames containing '@' - #585
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
Bundler assigns a BUNDLE_<HOST> credential to the source URI's userinfo and decodes each part with CGI.unescape, so a raw '@' (e.g. an email username) is rejected with URI::InvalidComponentError. Percent-encode the username and password both where `jf ruby bundle` injects the env var and where `jf setup` writes ~/.bundle/config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9974036 to
dc89cef
Compare
|
Hi @laurenverity , thank you for your contribution. Instead of creating the PR from a fork, could you create it from a branch of this repository? We cannot run the CLI integration tests from a PR that comes from a fork. |
Hi @udaykb2! Unfortunately I cannot push a branch due to not having appropriate permissions on this repo, it seems. What should I do in light of that? |
|
Hi @laurenverity , I ran integration tests on this PR. These changes will be available in upcoming CLI release (probably by next week). |

Problem
jf ruby bundlefails when the configured username contains@, which is the normal case for email-style Artifactory usernames. Bundler can't apply the credential the CLI passes it, because setting it as the source URI's userinfo raises:Fix
Adds
ruby.BundleCredential, which percent-encodes the username and password separately and uses it for both the injected env var and the config entry created in setup.Testing
Added new tests that cover both cases.
Summary by CodeRabbit