I'm putting together some documentation and don't have access to a non-configured machine to test this myself
I'm curious if you need a GitHub account to clone a repository from GitHub to a local machine.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI'm putting together some documentation and don't have access to a non-configured machine to test this myself
I'm curious if you need a GitHub account to clone a repository from GitHub to a local machine.
No. You just use a different URL:
git clone https://github.com/SomeUser/SomeRepo.git
However, the local repo will be "read-only" in the sense that you won't be able to push your changes back to the original repo. You will still able to modify files and commit changes locally, though.
In contrast,
git clone [email protected]:UserName/OtherRepo.git
works only if you have properly set up your environment with the necessary SSH keys and whatnot, but in return you'll get a repository that permits you to commit/push the changes back to the remote repo.
(Sorry for the unintentional ad for GitHub, I just had it in mind.)
Edit: The original answer had the git protocol instead of https but GitHub has since then turned it off.
git clone https://gitlab.com/SomeUser/SomeRepo.git
Jun 6, 2017 at 9:46
I was following some documentation for a product which required cloning from github. I didn't want to bother setting up an account so I needed to do exactly what was asked here.
The command in the documentation was:
git clone git://github.com/fcrepo4/fcrepo-message-consumer.git
but that just fails for me with.
Cloning into 'fcrepo-message-consumer'...
ssh: Could not resolve hostname github.com: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
I tried
git clone git://github.com/fcrepo4/fcrepo-message-consumer.git
as suggested in one of the answers but that failed too with.
Cloning into 'fcrepo-message-consumer'...
fatal: Unable to look up github.com (port 9418) (nodename nor servname provided, or not known)
What finally worked was this:
git clone https://github.com/fcrepo4/fcrepo-message-consumer.git
Or just use http prefix , and .git suffix is not mandatory too :
You can check with
git clone http://github.com/tizenteam/iotivity-example
Related info:
https://help.github.com/articles/why-is-git-always-asking-for-my-password/
.git
suffix.
You could use Github Tokens https://github.com/settings/tokens and use this:
git config --global url."https://${GITHUB_TOKEN}:[email protected]/".insteadOf "https://github.com/"
(replace ${GITHUB_TOKEN}
with the actual token