Git newbie here. I'm setting up git on a new Ubuntu VM and trying to clone some repos. The clone works for the following command:
git clone http://github.com/organisation_name/repo_name
(after prompt for username/password), but fails for
git clone git://github.com/organisation_name/repo_name
and also
git clone git://github.com/organisation_name/repo_name.git
with the same error message:
Cloning into 'repo_name'...
fatal: remote error:
Repository not found
Of course the obvious answer is "use the http
method", but I'm trying to understand why one works and the other doesn't. Any suggestions? (also is there any difference when using the .git
extension on the repo name btw?)
Thanks!
If you have a problem cloning a repository, or using it once it has been created, check the following: Ensure that the user has gone through initial GitCentric login and has the correct username, email, and ssh. This should return a usage message that refers to the config-branch, config-repo, and ls-repo commands.
The “fatal: Authentication failed” error message Instead you need to generate a personal access token. This can be done in the application settings of your Github account. Using this token as your password should allow you to push to your remote repository via HTTPS. Use your username as usual.
To clone a git repository, use the “git clone” command with the URL of your Git repository. For example, let’s say that you want to clone a public repository from Github, you are going to execute the following command
In some cases, you may be facing authentication failures when performing git clone. Make sure that you are writing the correct password when cloning a repository. In the section dedicated to git clone with password, you may need to inspect the git-credentials file.
By default, clone will create a reference to the remote repository called origin. This opens in a new window. Cloning a repo allows you to make local changes to the repository before committing and pushing them to the remote.
With the --bare argument passed to git clone, you will have a copy of the remote repo created with an excluded working directory. So, the repository will be created with the project history which can be pushed or pulled from but cannot be edited.
Well, I think you are using the wrong url in your second case
Try this instead
git clone [email protected]:organisation_name/repo_name.git
The difference is the :
in the url when using git@
vs the /
you are currently using, and the extra .git
at the end.
This should be the same url if you go to github and select the ssh url for cloning (and not the https one selected by default)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With