fatal unable to access could not resolve host GitHub

+1 vote

 I am using the clone command in Git Bash, but it shows me the below error.

fatal: unable to access could not resolve host: GitHub

How can I solve this error?

Apr 10, 2020 in Git & GitHub by akhtar
• 38,260 points
153,707 views

2 answers to this question.

+3 votes
Best answer

Hi@akhtar,

This can be caused in incorrect proxy settings , or error typing name, make sure you're using the exact URL of whatever you're trying to do.

Try these commands.

git config --global --unset http.proxy

Also set user- name and user-email.

git config --global user.name "user name"
git config --global user.email "user email"

Hope this will solve your error.

answered Apr 10, 2020 by MD
• 95,460 points

selected Dec 15, 2020 by akhtar
+2 votes

It might be the error that is caused by a protected repository. Check if you have privileges to that repository, or if you have changed your password. In any of these cases...execute the following commands:

git init

git remote add origin https://github.com/your_repository.git

git config --local credential.helper ""

This command will ask you to enter  your credentials when you execute git pull or push commands. 

So now execute the following command, so instead of cloning we are pulling from the repository.

git pull origin master

answered Sep 20, 2020 by Sugunasri
• 180 points

Related Questions In Git & GitHub

0 votes
1 answer

Error: git pull fails “unable to resolve reference” “unable to update local ref”

This happens when there are unnecessary files ...READ MORE

answered Jul 26, 2018 in Git & GitHub by Sophie may
• 10,620 points
18,931 views
0 votes
1 answer

gerrit-cherry-pick:fatal: 'origin' does not appear to be a git repository

The user account making that command does ...READ MORE

answered Aug 13, 2018 in Git & GitHub by Kalgi
• 52,350 points
1,995 views
+1 vote
0 answers

Give full access permission to another user in GitHub

How do I give full access permission ...READ MORE

May 15, 2019 in Git & GitHub by Umer
27,377 views
0 votes
1 answer

fatal: unable to auto-detect email address (got 'none.(none)')

Hi@MD, When you installed git in your system ...READ MORE

answered Apr 29, 2020 in Git & GitHub by akhtar
• 38,260 points
13,967 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,079 views
+2 votes
1 answer
0 votes
1 answer

error: Could not read error: unable to read tree object HEAD nothing to commit (working directory clean)

Hi@akhtar,  This kind of error may occur if ...READ MORE

answered Apr 10, 2020 in Git & GitHub by MD
• 95,460 points
8,961 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP