Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

ssh git clone

git clone git@github.com:<name>/<repo>.git
Comment

git clone through ssh

This is possibly unrelated directly to the question; but one mistake I just made myself, and I see in the OP, is the URL specification ssh://user@server:/GitRepos/myproject.git - namely, you have both a colon :, and a forward slash / after it signifying an absolute path.

I then found Git clone, ssh: Could not resolve hostname – git , development – Nicolas Kuttler (as that was the error I was getting, on git version 1.7.9.5), noting:

The problem with the command I used initially was that I tried to use an scp-like syntax.

... which was also my problem! So basically in git with ssh, you either use

ssh://username@host.xz/absolute/path/to/repo.git/ - just a forward slash for absolute path on server
username@host.xz:relative/path/to/repo.git/ - just a colon (it mustn't have the ssh:// for relative path on server (relative to home dir of username on server machine)
Hope this helps someone,
Cheers!
Comment

PREVIOUS NEXT
Code Example
Shell :: linux change file name 
Shell :: ubuntu kill service 
Shell :: running splash in docker command line 
Shell :: rename a file in linux 
Shell :: git push disable hooks 
Shell :: copy files between servers 
Shell :: download latest docker-compose 
Shell :: docker compose stop and start only specific 
Shell :: git use ssh instead of https 
Shell :: how to install onnx on jetson nano 
Shell :: sudo apt-get dbeaver 
Shell :: remove trailing slash from nginx 
Shell :: how to reset ubuntu 20.04 
Shell :: angular cli interface generate 
Shell :: relaunch doc macos 
Shell :: tail last 100 lines 
Shell :: docker create image and push 
Shell :: npm fibers windows error 
Shell :: rename local branch github 
Shell :: remove folder and contents linux 
Shell :: rust dockerfile 
Shell :: bash array forloop 
Shell :: cordova-ios latest version 
Shell :: vmd in terminal 
Shell :: cant find module firebase 
Shell :: raspberry pi default username 
Shell :: how to push code to bitbucket 
Shell :: install react react testing library 
Shell :: install git 
Shell :: redis client find key 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =