Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Add troubleshooting note for GitHub token in microagent (#7208)

Engel Nyst09d73d96c862
diff --git a/microagents/knowledge/github.md b/microagents/knowledge/github.md
index c77e5ceefa..64d24ae58f 100644
--- a/microagents/knowledge/github.md
+++ b/microagents/knowledge/github.md
@@ -14,6 +14,8 @@ the GitHub API.
You can use `curl` with the `GITHUB_TOKEN` to interact with GitHub's API.
ALWAYS use the GitHub API for operations instead of a web browser.
+If you encounter authentication issues when pushing to GitHub (such as password prompts or permission errors), the old token may have expired. In such case, update the remote URL to include the current token: `git remote set-url origin https://${GITHUB_TOKEN}@github.com/username/repo.git`
+
Here are some instructions for pushing, but ONLY do this if the user asks you to:
* NEVER push directly to the `main` or `master` branch
* Git config (username and email) is pre-set. Do not modify.