Skip to content

Commit fe9c23e

Browse files
authored
Merge pull request #7 from link-foundation/issue-6-dda093eb2e77
Update gh auth login command to use --web flag for browser-based auth
2 parents 2e1e8f5 + f9488d3 commit fe9c23e

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gh-setup-git-identity": patch
3+
---
4+
5+
Update gh auth login command in docs and CLI to use `--git-protocol https --web` flags for improved browser-based authentication flow

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A tool to setup git identity based on current GitHub user.
1212
Instead of manually running:
1313

1414
```bash
15-
gh auth login -h github.com -s repo,workflow,user,read:org,gist
15+
printf "\n" | gh auth login -s repo,workflow,user,read:org,gist --git-protocol https --web
1616

1717
USERNAME=$(gh api user --jq '.login')
1818
EMAIL=$(gh api user/emails --jq '.[] | select(.primary==true) | .email')
@@ -99,7 +99,7 @@ GitHub CLI is not authenticated.
9999
100100
Please run the following command to login:
101101
102-
gh auth login -h github.com -s repo,workflow,user,read:org,gist
102+
printf "\n" | gh auth login -s repo,workflow,user,read:org,gist --git-protocol https --web
103103
104104
After logging in, run gh-setup-git-identity again.
105105
```

src/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async function main() {
7171
console.log('');
7272
console.log('Please run the following command to login:');
7373
console.log('');
74-
console.log(' gh auth login -h github.com -s repo,workflow,user,read:org,gist');
74+
console.log(' printf "\\n" | gh auth login -s repo,workflow,user,read:org,gist --git-protocol https --web');
7575
console.log('');
7676
console.log('After logging in, run gh-setup-git-identity again.');
7777
process.exit(1);

0 commit comments

Comments
 (0)