Repository navigation
Closed
Labels
coreThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLIwindowsRelated to Windows hosts or runners
Description
Describe the bug
When I authenticate in gh with Powershell on Windows 10 it saves variuous files in .config/gh in my user profile folder.
It is expected on Linux, but on Windows I would love to have those files in %APPDATA% (like Github Desktop).
PS C:\Users\user> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 19041 1
PS C:\Users\user> gh --version
gh version 1.0.0 (2020-09-16)
https://github.com/cli/cli/releases/tag/v1.0.0
Steps to reproduce the behavior
- Authenticate
- Find files in ~/.config/gh
Expected vs actual behavior
I expect configuration files to be in %APPDATA%/Github Cli when authenticating in Windows enviroment.
Logs
PS C:\Users\user> gh auth status
You are not logged into any GitHub hosts. Run gh auth login to authenticate.
PS C:\Users\user> gh auth login
? What account do you want to log into? GitHub.com
- Logging into github.com
? How would you like to authenticate? Login with a web browser
! First copy your one-time code: F775-F974
- Press Enter to open github.com in your browser...
✓ Authentication complete. Press Enter to continue...
? Choose default git protocol HTTPS
- gh config set -h github.com git_protocol https
✓ Configured git protocol
✓ Logged in as user
PS C:\Users\user> gh auth status
github.com
✓ Logged in to github.com as user(~/.config/gh/hosts.yml)
✓ Git operations for github.com configured to use https protocol.
Reacted by Somraj Saha
Reacted by Reza Tavakoli, Mel Massadian and hanzala-Databrain
Metadata
Metadata
Assignees
Labels
coreThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLIwindowsRelated to Windows hosts or runners
Activity
mislav commentedon Sep 24, 2020
Good point; thank you!
Ref. #554
[-]Authenticating in Windows creates .config in user profile[/-][+]Store gh config in %APPDATA% on windows[/+]Neurognostic commentedon Oct 24, 2020
I would still like
ghto respectXDG_CONFIG_HOMEandXDG_DATA_HOMEin a Windows environment, but to fall back to%APPDATA%and%LOCALAPPDATA%if XDG variables are not set.just1a-person commentedon Dec 23, 2020
I would still like to see
config.ymlin ~\.config\gh\config.ymlmelMass commentedon Mar 7, 2024
For those who find this from google, it wasn't obvious, this now gets installed in :
C:\Users\User\AppData\Roaming\GitHub CLI\config.ymlbedge commentedon Jul 1, 2024
Anyone brave enough to try symlinking either config.yml or hosts.yml between env's (Windows & WSL)?
Would be nice to not have WSL mean one has to replicate every cfg dir just because the path format differs.