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 Introduction to Git GitHub and Other Remote Repositories Pulling Changes

Brett McGregor
Brett McGregor
Courses Plus Student 1,903 Points

Get an error when attempting to pull remote repo...

test@Brett-THINKPAD MINGW64 /c/Python36-32/Scripts/treehouse/Git/medals (master)
$ cd ../myclone

test@Brett-THINKPAD MINGW64 /c/Python36-32/Scripts/treehouse/Git/myclone (master)
$ ls
bronze.html  medals.html  silver.html

test@Brett-THINKPAD MINGW64 /c/Python36-32/Scripts/treehouse/Git/myclone (master)
$ git remote

test@Brett-THINKPAD MINGW64 /c/Python36-32/Scripts/treehouse/Git/myclone (master)
$ git pull
fatal: 'C:/Program Files/Git/home/treehouse/workspace/medals' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The medals repo does exist, so...?

probably you meant something like this...

git remote add origin https://github.com/username/somerepositoryname.git
Brett McGregor
Brett McGregor
Courses Plus Student 1,903 Points

thanks Krishna, but no, my question relates directly to the exercise. I am still working locally.

Development Tools> Introduction to Git> GitHub and Other Remote Repositories> Pulling Changes

can you try...

git remote show origin


git config --get remote.origin.url
Brett McGregor
Brett McGregor
Courses Plus Student 1,903 Points

Hi Krishna, when I try your second suggestion: git config --get remote.origin.url i get a clue to the problem:

test@Brett-THINKPAD MINGW64 /c/Python36-32/Scripts/treehouse/Git/myclone (master)
$ git config --get remote.origin.url

That path /home/treehouse/workspace/medals is incorrect for my local workspace - now I think this is because I copied the files from the teachers resources. It appears that the git repository has recorded that path to the remote repo from his own local workspace. Does that sound right?

Is there an easy way to change the path to the remote?

Brett McGregor
Brett McGregor
Courses Plus Student 1,903 Points


so I worked back through the exercise steps locally (without grabbing a copy of the teacher resource/downloads) and now the cloning etc working perfectly.

That will teach me for trying to take shortcuts - but I learned something in the process :)

Thanks Krishna for the clue!


Glad it worked out.

1 Answer

If you have the same issue as the Brett another way if you are using the treehouse files.

Clone the repository to a new file: (Ex file name) myclone3

Once you do the other steps like

  1. add the gold.html to the original repository
    1. check the log (git log) see the change
    2. cd ../myclone3 (it will be updated but still finish the example)
  2. git remote origin
    1. git pull (it will show it is already up to date) and will update once you git pull again for the myclone3 file

The files are linked to the treehouse repository so you won't be able to change it because myclone is created once you download the files from the website.

This took me a really long time to figure out and I hope it will save someone time and confusion. :)