Skip to content

Store gh config in %APPDATA% on windows #1944

@mcorossigo

Description

@mcorossigo

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

  1. Authenticate
  2. 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.

Metadata

Metadata

Assignees

Labels

coreThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLIwindowsRelated to Windows hosts or runners

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions