github-education-resources / classroom

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.
https://classroom.github.com
1.34k stars 564 forks source link

Can't clone template repos from another organization #2219

Closed kurmasz closed 5 years ago

kurmasz commented 5 years ago

I just set up my first GitHub classroom assignment. Everything looks good on my end; but, when my student attempts to follow the invitation link, he gets this error:

"Starter code template repository was not found. The repository might be deleted, or the organization that owns the repository has restrictions on third-party access. (Resource could not be found on github.com)"

The GitHub classroom is associated with this organization: https://github.com/gvsucis263 The assignment clones from a template repository in this organization: https://github.com/kurmasz-assignments

Looking through other issues, I suspect the problem is related to the Third Party Access setting for kurmasz-assignments.

Should Third Party Access restrictions prevent GitHub classroom from performing read-only operations on repositories in this organization?

If so, how do I add GitHub classroom as an authorized application? This article says to go to the Marketplace; but, I don't see "GitHub Classroom" in the marketplace: https://help.github.com/en/articles/installing-an-app-in-your-organization

To Reproduce Follow this invitation link: https://classroom.github.com/a/eOmRrwVj

Expected behavior a new repository for the student is created based on the template.

Screenshots

Screen Shot 2019-08-09 at 1 10 09 PM
EricPickup commented 5 years ago

Hi @kurmasz, thanks for the detailed report. This is an issue we've been investigating for a while.

The link you provided is for installing a GitHub App, however GitHub Classroom is currently an OAuth Application.

Could you navigate here on your organization that the repo belongs to (kurmasz-assignments)? Organization -> Settings -> Third-party access and tell me if you have any applications listed there? Do you see an option to Remove restrictions or an option to Setup application access restrictions?

kurmasz commented 5 years ago

I solved my problem; but, there may be a related bug.

Before I got your email, I found this link on the web: https://github.com/settings/connections/applications/64a051cf1598b9f0658f and it allowed me to authorize the Classroom app in the kurmasz-assignments repository.

However, when I go to Organization -> Settings -> Third-part access for a different organization that has not yet authorized GitHub classroom, I do not see an option to Setup application access:

[cid:ACD09C75-6769-44E4-8EC8-49C1658D0835]

Just now, I was able to click the “your own authorized applications”, which took me to this screen:

[cid:EEB39BAF-D9A5-42BE-87C5-2A1A91C92D0D] I now see that I can click on the GitHub Classroom link and authorize it for all of my organizations; but, an hour ago that wasn’t at all obvious.

I’m all set now; but, I hope this will help you tweak your User Experience a bit.

Thanks for the quick reply,

Zack

On Aug 9, 2019, at 4:20 PM, Eric Pickup notifications@github.com<mailto:notifications@github.com> wrote:

Hi @kurmaszhttps://github.com/kurmasz, thanks for the detailed report. This is an issue we've been investigating for a while.

The link you provided is for installing a GitHub App, however GitHub Classroom is currently an OAuth Application.

Could you navigate here on your organization that the repo belongs to (kurmasz-assignments)? Organization -> Settings -> Third-party access and tell me if you have any applications listed there? Do you see an option to Remove restrictions or an option to Setup application access restrictions?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/education/classroom/issues/2219?email_source=notifications&email_token=AADBBJHZIHGOW6QKM5KJGS3QDXGPTA5CNFSM4IKW7572YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD37VSMY#issuecomment-520050995, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AADBBJHEU2XNJ77CP45LXKLQDXGPTANCNFSM4IKW757Q.

-- Zachary Kurmas Associate Professor of Computer Science Grand Valley State University http://www.cis.gvsu.edu/~kurmasz

EricPickup commented 5 years ago

Glad you were able to work it out. This information helps a lot. We're working to improve this as much as possible, thanks @kurmasz!

FYI the images you replied with weren't posted for some reason (maybe because you replied through email?).