I am unable to clone a Git repository, and getting this error:
krishna.soni@KRISHNACHANDRAS /c/Projects $ git clone http://stage.abc.com:10088/pqr
http://<
After changing permissions of folder in which I was cloning, it worked:
sudo chown -R ubuntu:ubuntu /var/projects
I had the similar issue. I change the ssh keys and restarted and tried all other 'n' solutions. But the actual issue for me was our gitlab default protocol changed from ssh to https.
check the remote url with
git remote -v
change the remote url
git remote set-url origin https://URL
1. To Authenticate you need to add your public part of your SSH key pair to bitbucket from within your user settings: User Settings --> SSH keys
You will find the said public part in your ~/.ssh directory, usually id_rsa.pub
. note the .pub
part of the file name for Public.
it will help you to generate one if you don't already have one
You are not done yet ...
2. You need to let your system know what key to use with which remote host, so add these lines to your ~/.ssh/config file
Host bitbucket.org
IdentityFile ~/.ssh/PRIVATE_KEY_FILE_NAME
Where PRIVATE_KEY_FILE_NAME
is the name of private part of your SSH key pair, if you haven't messed with it, usually its default name is : id_rsa
in this case replace PRIVATE_KEY_FILE_NAME
above with id_rsa
(the private key DOES NOT have a .pub
extension)
I wanted to clone an open source project so I could submit some pull requests. The problem was that I didn't have permissions from the owner of the project. No matter, since my intention was to submit a PR, here is a viable alternative:
My solution:
Then clone from your forked repository.
Work on your features and then submit a pull request.
I see this errormessage has a lot of different reasons. I had the same error when trying to set up locally another repository alongside one already fully working with ssh etc. and connect it to same server, but other repository. No answers were here to be found, but I figured it out. So I post it. Hopefully helps someone.
git remote add origin git@git.ourserver.com:teamalpha/repositorytwo.git
Useful thread and I don't bring much new to the table. The step I took is also part of the description Maxime helpfully points to but some may overlook it. The section is Adding your SSH key to the ssh-agent.
I had already generated my ssh-key but after a reboot I was unable to clone one of my own repositories.
I had to start the ssh-agent and add the private key to this agent in order to clone.
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa