5

I'm trying to clone from some git repository, with a command like:

git clone username@path.to.server/repository

The problem is that my username contains the @ char within.

When I try to clone using some dummy user name without the @ char, I get authentication error. But, once I try with my username, I get:

> git clone myuser@mydomain.com@path.to.server/repository
fatal: unable to access .... Could not resolve host mydomain.com@path.to.server

I tried escaping the @ sign using backslash, and using 2,3,4 and 5 backslashes - still the same problem..

Any ideas how to overcome it?


Solution:

Thanks to those who answered/commented with references to other threads.

The very simple solution, detailed in the references, is to use %40, which is the ASCII encoding of the char @. Tried it - it works!

git clone myuser%40mydomain.com@path.to.server/repository
SomethingSomething
  • 11,491
  • 17
  • 68
  • 126

1 Answers1

1

why not try to clone the git git clone pathTORepor and then git will prompt you to type username then type your username and password if needed

Smit
  • 2,078
  • 2
  • 17
  • 40