popcodeorg / popcodeorg/popcode
401 unauthorized error when trying to export to Github from Popcode
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 191
- Forks
- 143
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 5
Description
Describe the bug
A clear and concise description of what the bug is.
When you click on the "Export Repo" button, the call POST https://api.github.com/user/repos produces a 401 unauthorized error. This leads to the repo not being created for the person on Github.
To Reproduce
Steps to reproduce the behavior:
- Login to an account with Github Linked
- Click the arrow to the right of "Create Snapshot"
- Click "Export Repo" option in the dropdown list
- See the error
Expected behavior
A clear and concise description of what you expected to happen.
After clicking "Export Repo" a repo should be created with the PopCode code and a user should be taken to the Github page.
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Firefox/98.0
Additional context
This might be a global PopCode issue, which means the Unit 9 project where students export to Github might be stalled if it is not fixed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Export Repo flow: log in with a linked GitHub account, choose Export Repo, and inspect the POST request to https://api.github.com/user/repos. Trace the linked-account credentials used for that request and verify that the completed flow creates the repository and redirects the user to GitHub.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, javascript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100