Could not resolve host github com

+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
154,983 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

fatal: could not create work tree dir 'C:/Program Files/Git/data': Permission denied

Hi@akhtar, You may get this error if your ...READ MORE

answered Jun 14, 2020 in Git & GitHub by MD
• 95,460 points
21,587 views
+1 vote
1 answer
0 votes
0 answers

Could not open a connection to your authentication agent

I am getting this warning error: $ git ...READ MORE

May 8, 2022 in Git & GitHub by Kichu
• 19,040 points
1,473 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,198 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
9,142 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