The Computer Oracle

Git clone only works with ssh://git@.. and not with git@

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Ominous Technology Looping

--

Chapters
00:00 Git Clone Only Works With Ssh://Git@.. And Not With Git@
00:42 Accepted Answer Score 33
01:25 Thank you

--

Full question
https://superuser.com/questions/1312575/...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#ssh #git

#avk47



ACCEPTED ANSWER

Score 33


You are using the incorrect syntax.

When you remove the scheme:// prefix, git no longer interprets your address in URL style anymore, but instead as rcp/scp style. But for rcp/scp style addresses, the path must be separated from user@host using a colon : (specifying a port is not supported). For example:

git clone daniels@server.com:repo.git

git clone git@bitbucket.com:daniels/example.git

Without the colon, git will only interpret the address as a local path.

(You can see more details in the git clone or git fetch manual page.)