๐ [bug] - Username containing `@` breaks Jenkins pipeline
rmarting opened this issue ยท 4 comments
๐ Description
At the end of Jenkins pipeline exercise, the pipeline fails:
+ git clone 'https://****@gitlab.com/rmarting-tl500/tech-exercise.git' config-repo
Cloning into 'config-repo'...
fatal: unable to access 'https://redhat.com':****@gitlab.com/rmarting-tl500/tech-exercise.git/': Port number ended with 'r'
As I am using an external Git server, the user is identified using an email. So it seems that the pipeline is not skipping that character to create the git clone command.
๐ถ Steps to reproduce
Use an email as user id to log into git server.
๐งโโ๏ธ Suggested solution
... if applicable
you need to use encoding for your username I guess - like example%40redhat.com
while creating the secret. Not sure if it will break any other exercises but since you are passing a special character to a URL, you need encoding ๐ค
TBH I am not sure if the issue should be managed in the Sealed Secret directly, as that value is coming from there. I did not find any issue in other exercises using an email id in the username with that secret (git-auth), I only found here.
As the secret has the real value of the credentials (including @
and maybe other special characters), the pipeline should manage it to create the right command. Maybe my opinion could be wrong.
Ideas?
Can we move convo over there .. cheers