Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bitbucket can't pull/push from repository

Tags:

git

bitbucket

So basically I have a server where I have bitbucket git repository set up. I've been using it for months and now out of the blue sky when I try to pull I get the following error:

ssh: Could not resolve hostname bitbucket.org: Name or service not known fatal: Could not read from remote repository.  Please make sure you have the correct access rights and the repository exists. 

I'm 100% sure I have correctly setup my ssh-keys.

git remote -v origin  [email protected]:marel/tshirtmafia.git (fetch) origin  [email protected]:marel/tshirtmafia.git (push) 

Any suggestions how to fix this ? Please let me know if you need anything else.

like image 255
Marijus Avatar asked Apr 20 '15 12:04

Marijus


People also ask

How do I enable pull requests in Bitbucket?

Before going any further, check and save your work on the local machine and update the branch. Then, open the Bitbucket website on your browser and navigate to the repository in question. Click on the menu button in the top-left, and select Pull Requests. Here, click on the Create pull request button.


2 Answers

This issue is caused by incorrect git configuration. Open .git folder in root folder of your project and in config file please find the line that starts with

url = [email protected]

Most probably you have specified protocol there and defined url like url = ssh://[email protected]

remove ssh:// and it should do the trick for you.

like image 145
szadrutsky Avatar answered Sep 24 '22 15:09

szadrutsky


This worked for me. I had added google DNS server details in NetworkPreference.

8.8.8.8,8.8.4.4

https://developers.google.com/speed/public-dns/docs/using

like image 27
sreekumar Avatar answered Sep 24 '22 15:09

sreekumar