12

I'd like to clone a repository that uses ssh. To do that I need to enter my username. I've tried to do this based on How to provide username and password when run "git clone [email protected]"?. However, my username has @ in it, which seems to mess with the command.

My current command without username entered is sudo git clone ssh://[email protected]/y/. Now I want to do the same, but with my username [email protected]. How do I do that?

If I try to write sudo git clone [email protected]@git.x/y/ I get the error repository [email protected]@git.x/y/ does not exist

Community
  • 1
  • 1
pir
  • 5,513
  • 12
  • 63
  • 101

1 Answers1

35

Url-encode your username, replacing "@" with "%40".

joemfb
  • 3,056
  • 20
  • 19
  • Thanks. I now get an error msg: `gnutls_handshake() warning: The server name sent was not recognized`. I don't know if it's related to this or a separate issue. I can only change things on the client-side. – pir Mar 30 '15 at 21:11
  • I believe that's a TLS validation issue. Searching for that error string leads to several suggested server configuration changes – joemfb Mar 30 '15 at 21:15