CLAUDE.md: token is stored, just push
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4af720e9e4
commit
f983b8e0ac
@@ -24,13 +24,7 @@ git diff origin/main | grep -F -e "$(ssh jason@192.168.1.67 sudo cat /var/lib/st
|
|||||||
## Pushing
|
## Pushing
|
||||||
|
|
||||||
Remote: `https://gt.wittyoneoff.com/jason/lovey.git`, branch `main`, local clone `~/Documents/GitHub/lovey`.
|
Remote: `https://gt.wittyoneoff.com/jason/lovey.git`, branch `main`, local clone `~/Documents/GitHub/lovey`.
|
||||||
No credential is stored on this machine. Ask the user for a Gitea token and pass it for that one
|
A Gitea token is stored in `~/.git-credentials` (`credential.helper store`). When asked to push, run the
|
||||||
command only, so git never saves it:
|
secrets grep above, then `git push origin main`. Don't ask the user to push or to supply a token unless
|
||||||
|
the push fails with 401 (token revoked). Gitea's SSH clone URL still shows the old address
|
||||||
```sh
|
`192.168.1.208` (the Gitea host is now `.166`), so use HTTPS.
|
||||||
git -C ~/Documents/GitHub/lovey -c http.extraHeader="Authorization: token <TOKEN>" push origin main
|
|
||||||
```
|
|
||||||
|
|
||||||
Don't write the token to git config, `~/.git-credentials`, a file or memory. If pushing fails with 401,
|
|
||||||
the token was revoked: ask for a new one. Gitea's SSH clone URL still shows the old address
|
|
||||||
`192.168.1.208` (the Gitea host is now `.166`), so SSH pushes won't work until that is fixed.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user