-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
abc-init fails getting access token #507
Comments
Not sure if this is relevant? |
I saw this discussion and gist that @kcranston opened. If I try the same code I get the following import requests
client_id = "Iv1.8df72ad9560c774c"
header = {"Content-Type": "application/json", "Accept": "application/json"}
# Step 1
payload1 = {"client_id": client_id,}
r = requests.post(
'https://github.com/login/device/code',headers=header,json=payload1
)
data = r.json()
data
{'error': 'device_flow_disabled',
'error_description': 'Device Flow must be explicitly enabled for this App',
'error_uri': 'https://docs.github.com/'} so it seems the |
@kcranston @lwasser @pyup-bot @nkorinek can you help? Or do you know who is managing the |
Unfortunately, everyone you have tagged here is no longer with earthlab (and no longer has ownership access to the organization and the bot settings). I suspect you are correct about the device flow changes. One option would be to fork the repo and create your own github app (which would give you ownership over the settings). |
I imagined that may be the case. So the code for the github app is in this repository? Sorry I have never used/created one. |
@kcranston Is anyone on this list still at earthlab? https://github.com/orgs/earthlab/people |
Can one of you help? @jdiax4302 @jlpalomino @joemcglinchy @jvtcl @mcattau |
I encounter the same problem. @ozak Have you fixed this problem? |
I doubt that there is anyone with both knowledge of this repo and owner / admin privileges on this github organization. Your best approach would be to follow these instructions to create a new github app: https://docs.github.com/en/developers/apps/building-github-apps/creating-a-github-app and then modify the client id to match your app here in your local copy of the code (ideally, this would be an environment variable instead of being hard-coded, but at this time we only had the earthlab-owned app): https://github.com/earthlab/abc-classroom/blob/main/abcclassroom/auth.py#L110 |
@kcranston do you know which URLs are used? I planned on doing this but had no idea if I had to create a website for it or whether it is the Github link to the repo or what. There are a lot of technical things one has to fill that are not clear to me. |
You will want to select 'Device flow' during the setup (which is the command-line process for authorization). With this flow, the homepage and callback URL do not matter. I think you still need to enter something when you set up the all, but they aren't used in the process. |
Thanks! I'll give it a try. |
@kcranston do you know which permissions one needs to give? Do I need to give permissions on the user, org, or repo level? Seems the repo level permissions are for creating etc. Not sure about the other two. |
@fantasyEthan if you want to try using my fork it seems it may be working. At least the basic part seems to go. I still have to check if I can create a new assignment etc, but do not have time right now. pip uninstall abc-classroom
pip install git+https://github.com/ozak/abc-classroom Let me know if you encounter any problems so I can change permissions if needed |
@ozak Hey! I'm so sorry for my late response, I am still maintaining this repo, just haven't checked in a while! I went ahead and enabled the device flow on the abc-classroom-bot, I hope that helps! Again, so sorry for how long this took, let me know if you try it out! |
No problem. Luckily @kcranston provided guidance and I was able to create the app, and I think my fork is working now. Thanks none the less |
Hi,
I am trying to test out
abc-classroom
for a new course. I tried setting up the Github access token following the instructions, but I am getting the following error:I saw in one of the discussions that one needs to install
abc-classroom-bot
in the organization, which I did.But I still get the same error. Can you help?
The text was updated successfully, but these errors were encountered: