I want to launch a git clone command with my password and username but my password contains special characters (e.g.: pass/word@123
) :
git clone https://username:pass/word@123@mysite.com/myrepo
The command is obviously not working because it does wrongly interpret the special characters. I tried using percent encoding and backslash but it is still not working. Git says the authentication failed when I use password%40123
instead of password@123
. What can I do ?
Note : I am not using github, but Microsoft TFS.
Note 2 : I can not type the url first and the password after when git asks (because I try to run the command from PHP/Symfony (but percent encoding is still not working when using it directly from command line))
Note 3 : Of course I cannot change the password
Thanks.
EDIT :
After testing, it is working on a GitHub repo (with percent encoding) but not on TFS. So the problem is coming from TFS.