-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh cli auth login does not work with the provided package. #1654
Comments
@dotKuro thanks for the workaround, I found the same issue yesterday. Have you filed an upstream issue at https://github.com/cli/cli? A quick search through the issues didn't find any related to this issue, so it's probably worth opening at least before assuming they won't fix. |
But the issue seems that the configuration of gh module in home-manager points to a file in storage, thus it can not be modified by gh |
Probably you should not try to use home-manager to manage gh config file when using gh tool to manage its config.. I do not know any way to fix this. |
Hmm... I'm confused :) |
@EncodePanda That is almost correct: Actually the secret of |
@dotKuro yes, you are 100% correct, maybe it is worth creating a ticket in gh |
For anyone following along with the workaround, you have to add |
Thank you for your contribution! I marked this issue as stale due to inactivity. If this remains inactive for another 7 days, I will close this issue. Please read the relevant sections below before commenting. If you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesIf you have nothing of substance to add, please refrain from commenting and allow the bot close the issue. Also, don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen--nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. |
Bump, still an issue. I think we should either clearly document this behavior and/or open an issue upstream on gh. |
Also, since NixOS/nixpkgs#109396, |
Thank you for your contribution! I marked this issue as stale due to inactivity. If this remains inactive for another 7 days, I will close this issue. Please read the relevant sections below before commenting. If you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesIf you have nothing of substance to add, please refrain from commenting and allow the bot close the issue. Also, don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen--nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. |
This is still an issue. |
Created the upstream issue here |
This has been fixed by cli/cli#5378 |
Thanks for the update. |
This still hasn't reached nixpkgs AFAICT (just got the error now). Is there anything we can do to hasten it making it into nixpkgs? |
Issue description
Running
gh auth login
for the first time after settingprograms.gh.enable = true;
in your home.nix will crash the gh cli with following error:Maintainer CC
@Gerschtli
Technical details
I investigated the source code of the gh cli and it seems that it not only writes the hosts.yaml which is for authentication (and should not be managed from the package which is correct 👍 ) but it also writes the config.yaml and will fail to do so, because the file is managed from the package. This will cause the gh cli to crash and stop the authentication.
I don't think that there is a way for a package to handle this correctly, I just wanted to document this issue. If anything the gh source code would need to be changed to not crash in this situation (which I think is reasonable, because people should be able to manage their configs them selfes), but I don't think this has a great chance of happening.
A current workaround would be:
The text was updated successfully, but these errors were encountered: