Repository navigation
Commit ab018e5
committed
fix(devcontainer): restore the gh config mount, which does work
The previous two commits removed the ~/.config/gh bind mount and justified it,
in devcontainer.json, AGENTS.md and both commit messages, with the claim that
the mount never worked because gh keeps its token in the system keyring, so the
mounted hosts.yml carries no oauth_token.
That claim is false on this host. ~/.config/gh/hosts.yml contains a real
oauth_token, and in a running container using the mount, with GH_TOKEN and
GITHUB_TOKEN unset, `gh auth status` reports:
Logged in to github.com account blooop (/home/vscode/.config/gh/hosts.yml)
gh writes to a keyring only when one is available and falls back to the file
otherwise, so the keyring claim was true of some environment but not this one,
and it was generalised into the file as if it always held.
Nothing broke under `dl`, which is why it went unnoticed: `dl` forwards
GH_TOKEN, devpod applies workspace env after the devcontainer's own, and the
env token wins wherever both are present. The containers that lost gh auth
they previously had are the ones opened another way -- a plain `devpod up`, or
VS Code's Reopen in Container. devlaunch's own README says to keep the mount
for exactly those entry paths.
So the mount comes back as the third entry in mounts, the Dockerfile creates
/home/vscode/.config/gh for it again, and the comment above the mounts block
now says why it is kept rather than why it was dropped. AGENTS.md again states
that host gh authentication is shared through the mount, and adds that a
forwarded GH_TOKEN outranks it under `dl`.
The ~/.ssh removal is untouched and was verified separately: devpod forwards
an ssh agent at a socket path of its own, and in a live container `ssh-add -l`
lists the host key and `git ls-remote` against a git@github.com: origin
succeeds with an empty ~/.ssh. The old hardcoded
SSH_AUTH_SOCK=/home/vscode/.ssh/agent.sock overrode that working forwarded
socket, so it stays gone too.1 parent 9bb1d62 commit ab018e5
3 files changed
Lines changed: 30 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 65 | + | |
| 66 | + | |
68 | 67 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
77 | 80 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
87 | 92 | | |
88 | 93 | | |
| 94 | + | |
89 | 95 | | |
90 | 96 | | |
91 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments