Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Creating a Project Pages Site

karina037
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
karina037
Full Stack JavaScript Techdegree Graduate 17,179 Points

Please help with "fatal: unable to access"

hi all, when using git bash and trying to push gh-pages with command 'git push origin gh-pages' I get fatal: unable to access url... could not resolve: github. I checked the url with git remote -v, looks the same. I had 5 repos to create gh-pages branches for and none of them worked. Eventually I did this with github desktop, but really want to understand why the terminal could not do this. Thanks for any suggestions.

2 Answers

Seth Missiaen
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Seth Missiaen
Web Development Techdegree Graduate 21,652 Points

In the video, when pasting in the commands from the GitHub website, the instructor (Guil) makes sure that "SSH" is the protocol for the repository directory. I used the default HTTPS option which generated the same error when I tried running the command:

"git push -u origin main"

I followed the instructions on the pages below to set up SSH keys and ran the command again.

First, generate new keys and add to the ssh-agent: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

Then add the key to your GitHub account via the web interface: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account

I'm not sure if your issue is with SSH or not, but it helped me.