Make.git open in ssh

210 Views Asked by At

I have download a git with a wget on a vps through putty.

I see the file is listed on the vps like so:

bitcoin-sniffer.git  .lastlogin     .python_history

Now how can I execute the .git, or actually use the files that are within it? I have tried

 git clone bitcoin-sniffer.git

The error:

fatal: destination path 'bitcoin-sniffer.git' already exists and is not an empty directory.
2

There are 2 best solutions below

0
On BEST ANSWER

Generally, the git clone command is followed by an address with ssh or HTTPS path to download a repo. The git command is not run against a *.git "package".

An example would be: bash git clone https://github.com/sebicas/bitcoin-sniffer.git

This would download and create a folder by the name bitcoin-sniffer. Within this folder, git commands can be run, like git status.

1
On

The "git" you acquired is a full git repository, with the entire history of the protect and all the information you need to get the current state of the files. Judging by the .git extension, I would assume that the repository is "bare", meaning that it only contains the compressed history but not a working copy of the current state of the project. Conventionally, bare repos have a .git extension, while a full working copy would have a .git folder in the project root.

Your intuition to clone the repository to get a working copy is correct. It's not working because by default, git clone running locally will try to make a folder with the same name as the repo. Give it a different folder name as an additional parameter instead:

git clone bitcoin-sniffer.git bitcoin-sniffer

This is actually doing an extra step in all probability. You can clone directly from a remote location using either SSH or HTTPS. If your project comes from GitHub, for example, you can get a read-only copy (that you can modify locally but not push back) anonymously over HTTPS:

git clone https://github.com/sebicas/bitcoin-sniffer.git

You really shouldn't be getting "gits" using WGET under normal circumstances.