Github [Codespaces] rejecting pushes to Origin from Collaborators

The Short of It

I have a github repo meant to be used as a codespace. Collaborators have made github accounts, been added as “collaborators” on the repo, then have gone to the repo page, created a codespace, and used git to checkout a branch, say example_branch.

After making a few commits to that branch and pushing it to origin/example_branch by Staging, Committing, and Syncing all using the VSCode / Codespaces browser GUI, they suddenly get an error upon clicking Sync telling them that they don’t have permission to push and suggesting they fork the repository. I don’t know why this error is occurring.

create codespace on main

The Plan

I’m a middle school teacher teaching a python course. I’d like to use github as an easy way for students to submit their assignments, rather than a low-tech way like copy+paste into google docs. I’ll start by acknowledging that this isn’t the intended use-case for git, but I truly thought my idea was straightforward enough to easily work.

The system I envisioned was having a branch off of main for each student. Each student made a git account, I added them as collaborators to my class repository, and they each checked out their own branch to commit their changes onto. They would never have merge or pull request these branches onto main, all they would need to do to submit their individual projects is push their commits up to the origin.

This would allow me to grade student projects quite easily. On my machine, I could git checkout student1-branch, see and run their code in my editor, then move on to the next student. It would also allow students to easily submit their work. For a middle school class, student work often looks like 100 students each making their own version of basic_turtle_loop_project.py. I don’t want them merging these, just making their work available to me.

sketch of my desired system

The Problem

Git constantly rejects the students’ push to origin calls. It gives them warnings they don’t have permission, and suggests they fork the repo. I truly don’t believe that forking will solve my problem – if I understand correctly, forking the repo will prevent me from easily accessing their code, which was the whole point of the system.

This is even something that happens after I have verified the system works as intended. Last week, I went through every student’s system and ensured they could successfully push to their corresponding origin/student[n]-branch. I looked at “Active Branches” on my repo’s github page and verified that each branch was active with 1 or more commits from the corresponding student. I had to reset some systems setups as they were already accidentally on forks. The next day, my changes seemed to be undone. Even though it had succeeded before, students were again getting the same error of “no permission, would you like to fork instead”?

Chromebooks & Codespaces

This is all happening on chromebooks, which could 100% be the cause. I’ve got a PC, but students only have chromebooks for class. In addition, my github repo is meant to be used as a github codespace. This allows me to get around some of the restrictions of a chromebook (no terminal access, at least on my schools’ machines) and allow students to run python code from a terminal, in addition to letting them edit in VSCode (instead of a weaker editor like replit).

After creating the codespace on the first day of class, students checked out their personal branch. Then, students would just have to press Commit and Sync after finishing a project, like in the image below. It’s possible I’m not understanding exactly what the Sync button is doing, but I’ve also tried git push --force in the terminal and gotten the same errors.

vscode github GUI

Students also don’t have personal chromebooks. They are kept in carts in each classroom, and when they arrive in class pick one at random to sign into. They click on the bookmark for the codespace, at which point they are prompted to log into their github account.

Please Help 😢

This system was supposed to disappear into the background. I’m not trying to teach git in this class. The intended student experience from git is “unusual looking save button”, and the intended teacher experience is “swap between each student’s project with a single simple shell command, all inside VSCode for ease of running the project once swapped to”.

This has been such a mess. I’m not sure why git is consistently rejecting their Sync commands. I’m going to have them copy+paste into google docs for the short term, which I know is absurd in 2024, but I’ve already wasted enough class time trying to fix this.

2

Instead of trying to commit in the online VSCode terminal, why not have them make their own commits directly in their branch on the GitHub repository?

It could be a network permission or a limitation related to resource usage, since the online VSCode in GitHub has certain constraints because its tied to GitHub’s infrastructure.

7

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật