Assignment Repo creation failure evidently due to enterprise policy restriction? #165463
Replies: 8 comments 9 replies
-
check your organization and enterprise settings before inviting students, unexpected restrictions can block access, even if you didn’t set them yourself. always coordinate with your admins. if you are admin look for a setting related to “Enterprise membership restrictions” or “Allowed members”. |
Beta Was this translation helpful? Give feedback.
-
I’ve also seen similar issues in the past where some hidden settings or policies can cause access problems, even when they aren't obviously configured. Double checking the "Enterprise membership restrictions" or "Allowed members" options in the organization’s settings should help. Also, if you have any institution-wide policies set up, it could be worth revisiting those just in case they’ve changed. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Sorry that I don't have an answer. Just writing to share my experience and my workaround (and a little rant). Experience:
Workaround: Frustration: |
Beta Was this translation helpful? Give feedback.
-
I am currently having the same issue and will be manually adding ~50 students via their usernames. |
Beta Was this translation helpful? Give feedback.
-
I am a GitHub Enterprise owner and one of the faculty that I support on GitHub Classroom just ran into this issue today. The Organization in question is part of our Enterprise. The faculty member does not recall changing any settings on their Organization and was using the same org successfully in previous semesters. I did not change any settings on the Enterprise and can't find anything relevant in the settings. Wondering what recent change GitHub may have rolled out to potentially cause this. |
Beta Was this translation helpful? Give feedback.
-
I am just now encountering the same problem at the beginning of the semester and managed to find a few related issues so I thought I'll share. It might be something to do with forking and outside collaborators. I have 300+ students in my class, this is going to be exhausting.
|
Beta Was this translation helpful? Give feedback.
-
Just reporting on my solution I had to implement over the weekend based on the suggestion by https://github.com/orgs/community/discussions/165463#discussioncomment-14214049 (thank you @yijizhang-nucs!). I figured out I don't need to collect students' Github.com emails beforehand. If I just use their university emails for the invites, they will be asked to add and verify that email address if they haven't done so already. So I just broadcast a message for them to be on the lookout for an invite email and accept it before accepting the Classroom email, the collect all email addresses into a text file, one address per line, and use the following BASH script using the #!/bin/bash
if [[ "$#" -lt 1 ]]; then
echo "Usage: $0 <org> < <file.txt>"
echo
echo "Example:"
echo " $0 Foo < emails.txt"
echo " - will send an invitation to organization Foo to every email in the file emails.txt"
exit 1
fi
GH_ORG=$1
echo "// Running at `date`"
while IFS= read -r email; do
echo // gh api "orgs/${GH_ORG}/invitations" -f email="$email" -f role=direct_member
gh api "orgs/${GH_ORG}/invitations" -f email="$email" -f role=direct_member
echo
sleep 1
done It outputs the JSON responses from the API along with comments (which is not strict JSON), so I just save the output into a log file and check which requests didn't go through. I use it as
Note, there is a 1 second delay after each request as per Github's API recommendations. Maybe this will save somebody some headaches. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I created a new assignment in a new Classroom tied to a new organization. The first (and only, so far) student to try to accept them assignment got this message:
"Your GitHub account cannot accept this invitation at this time. The Classroom's Organization restricts membership to users within the same Enterprise. Sign in with an account belonging to the same Enterprise or request that this account be added to your institution's Enterprise and try again. Contact your instructor or Enterprise administrators for further assistance."
I've run many GitHub classrooms from this enterprise account and never encountered this error before. I don't remember setting any such policy in this or any other organization. Maybe I've forgotten it somehow. Is anyone familiar with this error? Any thoughts on how to fix it? I don't want to add each student as a member of the enterprise! Thanks.
Beta Was this translation helpful? Give feedback.
All reactions