2

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.

Mr Kaaf
  • 31
  • 5
  • 2
    Does this answer your question? [Can I use an at symbol (@) inside URLs?](https://stackoverflow.com/questions/19509028/can-i-use-an-at-symbol-inside-urls) – Liam Mar 24 '20 at 07:50

1 Answers1

3

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
William A.
  • 425
  • 5
  • 14