A useful reminder from setting up a container workflow on Windows:
A tool being authenticated in PowerShell does not mean it will be authenticated inside WSL.
Windows and WSL have different home directories and can have different:
- environment variables
.netrcfiles- Docker configuration
- package-manager configuration
- SSH keys
- certificates
- CLI configuration
For example, a credential file might exist on Windows under:
$env:USERPROFILE
while the Linux tool looks under:
$HOME
Those are different environments.
This becomes particularly noticeable when a workflow crosses:
PowerShell
↓
WSL2
↓
Docker
If authentication succeeds on Windows but fails inside WSL, I now check the Linux-side configuration before assuming the credentials themselves are wrong.
Treat WSL as a separate Linux workstation unless you have deliberately configured something to be shared.