github-education-resources / teachers_pet

Command line tool to help teachers use GitHub in their classrooms
https://education.github.com/guide
MIT License
187 stars 74 forks source link

Can't push files? #124

Open umasshokie opened 9 years ago

umasshokie commented 9 years ago

This is my second semester using GitHub in my course. I was able to create repos and push files fine on Monday. But today I tried going through the exact same steps I always use (create_student_teams, create_repos, push_files), but I get an error when I tried to push files. I am in the directory of my identical synced repo whose files I want to push into the student's repo. Anyone see what I'm doing wrong, or why it isn't working anymore? The repo exists, and I have access through the owner team. I have 1 student in the student file, this is the error on push_files:

Authenticating to GitHub... Please enter your GitHub password: Found organization at: https://api.github.com/orgs/LUMCS201 Adding remotes and pushing files to student repositories. tjlabadini --> git@github.com:LUMCS201/tjlabadini-ClassExamples.git Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists. MMOMac:ClassExamples mmolsen$ teachers_pet push_files --organization=LUMCS201 --repository=ClassExamples --students=../late_students.txt --username=umasshokie --password Loading students: -> tjlabadini

I tried running git pull just in case the repo I an in and pushing files from wasn't right, but it says it is up to date. Thanks for any help! I can set up this one student without using teachers_pet, but I want to make sure the process will still work in the future when I do the same thing for all students for a new assignment.

kelleydv commented 9 years ago

I'm not sure if this will help, but I've had issues where I accidentally set some remotes in my local repo by running teachers_pet incorrectly. The quick fix was to delete the local repo and clone a new copy.

umasshokie commented 9 years ago

It is now that any time I try to push files using teacher's pet on my Mac I get this error. It is always after creating the repos using teacher's pet, and not interacting with the repos since creating them (i.e. they aren't even cloned on my machine). It works on my Windows machine fine though -- although unfortunately it is usually at home, and I am at work, when this issue occurs.

My workaround on the Mac is to clone all of the repositories using teacher's pet, then run a shell script to copy the files into the repos and commit/push them. Luckily I have <40 students, but I would imagine with more students that would be quite slow. Is anyone else experiencing this issue or have a different solution? I am definitely using teacher's pet correctly.

umasshokie commented 8 years ago

I am now getting this error when I try to push files using the teachers_pet push_files command...