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 trialBrett McGregor
Courses Plus Student 1,903 PointsGet 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
origin
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...?
Brett McGregor
Courses Plus Student 1,903 Pointsthanks 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
Krishna Pratap Chouhan
15,203 Pointscan you try...
git remote show origin
or
git config --get remote.origin.url
Brett McGregor
Courses Plus Student 1,903 PointsHi 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
/home/treehouse/workspace/medals
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
Courses Plus Student 1,903 PointsYep...
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!
Krishna Pratap Chouhan
15,203 Points(y)
Glad it worked out.
1 Answer
Gairee Hankins
7,497 PointsIf 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
- add the gold.html to the original repository
- check the log (git log) see the change
- cd ../myclone3 (it will be updated but still finish the example)
- git remote
origin
- 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. :)
Krishna Pratap Chouhan
15,203 PointsKrishna Pratap Chouhan
15,203 Pointsprobably you meant something like this...
git remote add origin https://github.com/username/somerepositoryname.git