Hi, I tried to push some code changes to my local github repo where I have authenticated through the Github CLI, gh
. It worked fine last week but this week i get the following error:
[muitilingualism@yaboi:/etc/nixos]$ git push origin main
/nix/store/n5n5ksn2pykk9a2y50zsv0znw0jly2mc-gh-2.49.2/bin/gh auth git-credential get: line 1: /nix/store/n5n5ksn2pykk9a2y50zsv0znw0jly2mc-gh-2.49.2/bin/gh: No such file or directory
And the following window shows up which prompts for my GitHub username:
(Filling out this prompt obviously won’t work as this form of direct authentication is not supported anymore).
I recently did a garbage collection on my system, and this is the only “change” I have made to my nix system:
These two are the commands in my terminal history:
4479 nix-env --delete-generations 30d
4480 nix-collect-garbage --delete-older-than 30d
gh
still works (kinda), when I try to authenticate
[muitilingualism@yaboi:/etc/nixos]$ gh auth login
? What account do you want to log into? GitHub.com
? What is your preferred protocol for Git operations on this host? HTTPS
? How would you like to authenticate GitHub CLI? Login with a web browser
! First copy your one-time code: XXXX-XXXX
Press Enter to open github.com in your browser...
✓ Authentication complete.
- gh config set -h github.com git_protocol https
✓ Configured git protocol
open /home/muitilingualism/.config/gh/config.yml: read-only file system
Not sure what to do. Doing sudo nixos-rebuild switch
did not resolve the issue.
Hope someone can help, thanks!