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 vote
Gonchik Tsymzhitov Community Champion Nov 10, 2017


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 Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,319 views 1 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot