GITHUB · PROJECT BACKUP

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

1
Open ChatCode → Settings → GitHub Accounts.
2
Choose Connect GitHub account. Your browser opens the official GitHub page and shows a verification code.
3
Sign in to GitHub and approve the request. ChatCode stores the authorized credential in encrypted local storage on your machine.

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.

Where does an existing project push after switching GitHub accounts?

The existing project still pushes to its origin current remote. Example:

origin = https://github.com/owner/project-a.git
Old account = @owner
New account = @another-user

Changing the default account to @another-user does not change the origin line above.

When you see “the current account does not have permission”

This is not a source-code error. The repository remains unchanged.

1
Open ChatCode → Settings → GitHub Accounts.
2
Select the account that previously had access to the project, or connect another GitHub account that can access the current repository.
3
Return to Projects, chọn đúng tài khoản cho project and thử Push to GitHub again.

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

← Back to Help Center