Authentication Failed
- Confirm browser authentication, Git Credential Manager, or SSH is configured.
- Do not use the GitHub account password for Git HTTPS authentication.
- Confirm the user has access to the organization repository.
- Remove stale cached credentials and authenticate again.
Wrong Remote Repository
git remote -v
git remote set-url origin https://github.com/cloudberrie-studio/cb-website.git
git remote -v
Push Rejected Because Remote Has Commits
This often happens when the GitHub repository was initialized with a README while the local project already had history.
git pull --rebase origin main
# resolve conflicts if required
git push -u origin main
Do not force push merely to bypass this condition.
Undo a Shared Commit
git log --oneline
git revert <commit-sha>
git push
Use revert for commits already shared. Avoid rewriting shared history.
Merge Conflict
- Pull the latest target branch.
- Open conflicted files and resolve the marked sections.
- Run tests.
- Stage resolved files.
- Continue the merge or rebase.
- Push the updated branch.
Secret Committed
- Immediately revoke or rotate the exposed credential.
- Remove it from the working tree and add the file/pattern to
.gitignore. - Assess whether history cleanup is required.
- Use an approved history-rewriting tool only with a coordinated plan.
- Force all collaborators to re-clone after history rewrite.
- Record the incident and corrective action.
Priority: rotation comes before repository cleanup because an exposed secret may already have been copied.
Recovery Checklist
- Confirm repository owner and access.
- Confirm default branch and remote URL.
- Inspect the GitHub audit log when available.
- Check Actions/Cloudflare deployment logs.
- Preserve evidence before destructive recovery.
- Document the final resolution in Lessons Learned.