Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy files from github via SSH using SCP

Tags:

github

scp

ssh

I'm trying to download a file from github repository and I would like to use ssh (using scp) instead of downloading it via HTTPS. Is that even possible? Could you give an example? Thanks.

like image 202
Marigold Avatar asked Oct 25 '14 17:10

Marigold


People also ask

Can I use SSH to copy files?

Often you will need to move one or more files/folders or copy them to a different location. You can do so using an SSH connection. The commands which you would need to use are mv (short from move) and cp (short from copy).

How do I copy an entire file from GitHub?

To copy the contents of a file, navigate to the file and click the Copy raw contents button on the toolbar: This feature is available in most desktop web browsers.

What is git SCP?

DESCRIPTION. A convenient way to copy files from the current working tree to the working directory of a remote repository.


1 Answers

No it's not possible. Git repositories don't consist of the actual files, but a collection of the incremental changes.

Therefore you have to clone a repository to get the file. Github only offers the HTTPS download as "services".

like image 158
H4kor Avatar answered Oct 05 '22 19:10

H4kor