It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Git / Linux can't resolve, needs numeric IP address instead... Edited

For Linux Mint 18, Git command line, Bitbucket repository.

I have a remote Bitbucket repository that works fine on Windows 7. Today I've been trying to set up the same repo on Linux (Mint 18).

I tested the setup of my SSH certificates, et cetera. So far, so good, I think:

$ git remote -v
origin    ssh://[bitbucketUserName/RepoName].git (fetch)
origin    ssh://[bitbucketUserName/RepoName].git (push)

But IF I try to to pull from / push to that remote repository, THEN I receive the following message:

ssh: Could not resolve hostname[bitBucket/UserName/RepoName] Name or service not known
Fatal: Could not read from remote repository

SO I used ping to get the IP address of, then inserted that IP address in the following command:

git push git@[bitBucketUserName/repoName].git

After a "continue?" prompt, git connected to the repo. (I was then told, correctly, that everything was up to date.)

WHY doesn't work but an IP address does? How do I fix this?

Cheers & thanks,
Riley SFO

3 answers

The problem is not with, but your linux machine. You need to fix DNS.

I´m not familiar with mint, but have a look at the network config.

0 votes


Please, fix dns configuration.

better way check in the terminal: 

cat resolv.conf 

kindly you can add it if your provider get possibility. (another place on the interface level  cat /etc/network/interfaces)

how to check work is it? it is easy.




After you will see a root cause.


You can read this artciles:

or video gui way for configuration



Gonchik Tsymzhitov

Thanks -- but so far none of the replies have answered the question. Evidently I need to do something with my Linux computer's DNS configuration but I have no idea what, exactly.

I appreciate the attempts to help. But I'm still looking for a complete and accurate answer...

Thanks.  I tried commenting out the line in  NetworkManager.conf as described in that article but it hasn't worked. A commentor stated that a reboot wasn't necessary to apply the changes. I'll circle back after I reboot tomorrow if that happens to resolve the issue.

I can still push/pull if I specify BitBucket's IP address. So for now I've simply scripted push/pull commands that include Bitbucket's IP address.  (These sorts Linux "aren't we clever" problems are the reason that Linux has never gained acceptance on the desktop -- what user wants to be obliged to remediate these sorts of idiocies?)

Cheers & thanks 'gain,

Well, I agree that you shouldn't have to battle DNS problems, but these appear on windows as well :-)

A reboot would probably not fix the issue. Restarting network might though.

Also, Linux Mint was compromised earlier this year. 

Thanks again. Happily the briefly misdirected version of Mint Linux was 17.3 and I'm running version 18. (I also recall seeing that news when it occurred and being happy that I hadn't downloaded Mint on 20 February, 2016.)

In the meantime I'm moving on. I've circumvented the issue with scripts that use Bitbucket's IP address to push/pull. Not ideal but it works and I can go back to doing useful work rather than baby sitting Linux / Bitbucket. (Never had this problem with Git on Windows 7 pushing/pulling to/from BitBucket. And don't have a problem pushing/pulling from this Linux computer to/from Github...)

Cheers & thx again,

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Atlassian supported Jenkins integration for Bitbucket Server

We’ve been building a plugin to integrate Bitbucket Server and Jenkins CI, and I’m excited to announce that our alpha is ready to download and install. It lets you seamlessly configure a Jenkins job ...

497 views 0 10
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you