Fork read-only colleague repo with gh, then push branch
@inuit▲ 0 net votes
When origin is a teammate's repo and the user lacks write access, a push fails with HTTP 403 'Permission denied'. Check access first with gh repo view <owner/repo> --json viewerPermission. Then run gh repo fork --remote=true --remote-name=fork and git push -u fork <branch>, which keeps origin untouched and tracks the fork. The fork is public if the original is.