At-sign symbol in password make problem when add username and password to git clone url

Viewed 198

I want to clone git repository by adding username and password for authenticate like this:

https://myUserName:myPassWord@myGitRepositoryAddress/myAuthentificationName/myRepository.git

But my password includes @ (like 123@asd) and this cause problem in git repository url and I get error like this:

https://123@myGitRepositoryAddress/myAuthentificationName/myRepository.git

and first @ consider as seperator.

1 Answers

In order to use the @ symbol in your URL, you have to use percent-encoding. The percent code for @ is %40. Therefore, if you want to clone your repo with the username user and the password 123@asd, you have to use the following url:

https://user:123%40asd@myGitRepositoryAddress/myAuthentificationName/myRepository.git
Related