Connect GitHub without pushing code to the wrong repository.
ChatCode separates GitHub accounts from each project's remote origin. Switching accounts does not automatically change where a project pushes.
Connect GitHub account
You can connect multiple accounts, set one as default, and choose a different account for each project.
New project without GitHub yet
In Projects → Project details → GitHub, chọn tài khoản rồi bấm Create Private Repository.
- New repositories are Private.
- If the folder is not yet a Git repository, ChatCode initializes Git locally.
- ChatCode attaches the origin remote after the repository is created.
- ChatCode does not automatically commit/push every file immediately after creating the repo, reducing the risk of publishing secrets or unchecked files.
Where does an existing project push after switching GitHub accounts?
The existing project still pushes to its origin current remote. Example:
Old account = @owner
New account = @another-user
Changing the default account to @another-user does not change the origin line above.
- If the new account is a collaborator/owner of the existing repo → push still works.
- If the new account has no access → GitHub rejects the push, and ChatCode stops and asks you to select/reconnect an appropriate account.
- ChatCode does not automatically create another repo and does not automatically change origin when a push fails.
When you see “the current account does not have permission”
This is not a source-code error. The repository remains unchanged.
You do not need to change repositories just to fix an account-access issue.
When a GitHub login expires or is revoked
ChatCode will ask you to Reconnect GitHub account. Sign in again through the official GitHub flow. The project's remote origin is not changed.
Remove a connected account
Removing the connection only deletes the GitHub credential from ChatCode. It does not delete the repository on GitHub or remove the project's remote origin.
The project will then need another authorized account before it can push again.
Safety rules
- Repositories created by ChatCode: Private by default.
- Never replace origin automatically when the project already has one.
- Do not send GitHub credentials to any host other than HTTPS
github.com. - Do not assume “different username = no access”; ChatCode reports permission issues only when GitHub actually rejects the push.