Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to escape '@' (at) symbol when pulling git repository on Linux shell

Tags:

git

linux

shell

I'm trying to pull a git repository from command line, specifying username and password inside the command, like this:

git pull https://username:[email protected]/.../myRepo.git

The problem is that my username is an e-mail, so apparently the character '@' need to be escaped, if not, I receive the message:

fatal: repository 'https://username:[email protected]/.../myRepo.git/' not found

Someone had the same problem and resolved it?

like image 377
fsinisi90 Avatar asked Oct 25 '25 14:10

fsinisi90


1 Answers

Usually, you can try and percent encode your password, replacing @ with %40

git pull https://username:<yourPasswordwith%40>@myrepo.kilnhg.com/.../myRepo.git
                                           ^^^
like image 140
VonC Avatar answered Oct 27 '25 02:10

VonC