Questions tagged [git-clone]

Obtains a local copy of a remote Git repository.

1359 questions
62
votes
6 answers

Is it possible to find out the users who have checked out my project on GitHub?

I'm wondering if there is any way to know who has checked out my project hosted on GitHub? This would include people who have forked the project directly on GitHub, as well as people who may have cloned the repository using standard git clone…
user1998981
  • 675
  • 1
  • 5
  • 6
61
votes
4 answers

How can I 'git clone' from another machine?

On one machine (IP address 192.168.1.2), I create a Git repository by $ cd /home/hap/working $ git init $ (add some files) $ git add . $ git commit -m 'Initial commit' And I have another machine on the same Wi-Fi network. How can I get clone from…
hap497
  • 154,439
  • 43
  • 83
  • 99
61
votes
1 answer

Git clone verbose output?

I have to clone a couple of big repos in my Dockerfile. It really can take an hour to clone a single repo and I want to see standard Git progress output to understand what's going on. However, when Git is started from the Dockerfile, I see no git…
Aleksei Petrenko
  • 6,698
  • 10
  • 53
  • 87
59
votes
6 answers

Git clone with custom SSH using GIT_SSH error

I am trying to clone a Git repo using a custom SSH command. I set the SSH command in the GIT_SSH environmental variably be running export GIT_SSH="/usr/bin/ssh -o StrictHostKeyChecking=no -i /home/me/my_private_key". But when, after the previous…
Paris
  • 6,323
  • 7
  • 31
  • 49
57
votes
3 answers

How to update a git shallow clone?

Background (for tl;dr, see #questions below) I have multiple git repository shallow clones. I'm using shallow clones because it's a lot smaller compared to a deep clone. Each is cloned doing about git clone --single-branch --depth 1
Hibou57
  • 6,870
  • 6
  • 52
  • 56
56
votes
4 answers

Dockerfile strategies for Git

What is the best strategy to clone a private Git repository into a Docker container using a Dockerfile? Pros/Cons? I know that I can add commands on Dockerfile in order to clone my private repository into a docker container. But I would like to…
Hemerson Varela
  • 24,034
  • 16
  • 68
  • 69
56
votes
5 answers

What determines default branch after "git clone"?

My understanding is that the default branch of a cloned repository is to be whatever HEAD points to in the repo being cloned. I now have a case where this is not true. My understanding is obviously flawed, so what does determine the default checkout…
Christian Goetze
  • 2,254
  • 3
  • 34
  • 51
55
votes
3 answers

Why can't I push from a shallow clone?

The git clone --depth command option says --depth Create a shallow clone with a history truncated to the specified number of revisions. A shallow repository has a number of limitations (you cannot clone or fetch from it, nor push from nor…
Philip Oakley
  • 13,333
  • 9
  • 48
  • 71
53
votes
6 answers

Git access to private repository using HTTPS

Trying to clone a private repository I have access to using HTTPS protocol, as that is only allowed outgoing traffic. git does not ask for passwords, just failed. error: The requested URL returned error: 403 Forbidden while accessing…
Ask and Learn
  • 8,661
  • 8
  • 37
  • 43
50
votes
3 answers

How to specify registry while doing npm install with git remote url?

I want to be able to clone a git repository using a URL as specified here ://[[:]@][:][:][/][#] I am getting an error saying npm ERR! 404 Registry returned 404 for GET on …
gurvinder372
  • 66,980
  • 10
  • 72
  • 94
49
votes
4 answers

How to make git clone faster with multiple threads?

My internet speed to github was never fast, and it's lingering at 50kb/s (my internet speed is 20mbit which is not very fast but still much faster than this). The repository is multi-gb by my estimates, so it'll take a very long time. Does git…
simonzack
  • 19,729
  • 13
  • 73
  • 118
47
votes
3 answers

What does depth for git clone mean?

We tried to speed up the CI build of one of our software projects at work. Somebody committed some huge (by git's standards) binaries early in the project's life. Rewriting git's history just to get rid of them seems like too much trouble, so we…
Machta
  • 1,656
  • 2
  • 16
  • 28
43
votes
2 answers

pause git clone and resume later?

Is there a way to pause git clone and resume it later? I'm cloning a really big repo (around 2GB) and my PC's been turned on for more than 40 hours. I have school to catch later, I don't want to leave it like this. Anybody got an idea? It's already…
황현정
  • 3,451
  • 6
  • 28
  • 35
43
votes
8 answers

Error connecting to agent: no such file or directory - adding key to ssh agent

I am trying to add key that I have generated to the ssh agent. Below are my steps C:\repo>ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (C:\Users\mante1/.ssh/id_rsa):C:\repo\key After the key is generated, I…
qa95
  • 439
  • 1
  • 4
  • 3
43
votes
5 answers

Visual studio 2017 with bitbucket, terminal prompts disabled

The visual studio stopped sending my commits to the bitbucket and this error appears Error encountered while cloning the remote repository: Git failed with a fatal error. HttpRequestException encountered. There was an error submitting the…