tftsr-devops_investigation/gh_2.63.0_linux_amd64/share/man/man1/gh-auth-refresh.1
Shaun Arman 6ebe3612cd
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m9s
Test / frontend-typecheck (pull_request) Successful in 1m15s
Test / rust-fmt-check (pull_request) Successful in 2m44s
Test / rust-clippy (pull_request) Successful in 24m22s
Test / rust-tests (pull_request) Successful in 25m43s
fix: lint fixes and formatting cleanup
- Fix TypeScript lint errors in setup.ts and LogUpload
- Remove unused imports and variables
- Fix duplicate Separator exports in ui/index.tsx
- Apply cargo fmt formatting to Rust code
- Update ESLint configuration
2026-04-09 20:42:40 -05:00

92 lines
2.2 KiB
Groff

.nh
.TH "GH-AUTH-REFRESH" "1" "Nov 2024" "GitHub CLI 2.63.0" "GitHub CLI manual"
.SH NAME
gh-auth-refresh - Refresh stored authentication credentials
.SH SYNOPSIS
\fBgh auth refresh [flags]\fR
.SH DESCRIPTION
Expand or fix the permission scopes for stored credentials for active account.
.PP
The \fB--scopes\fR flag accepts a comma separated list of scopes you want
your gh credentials to have. If no scopes are provided, the command
maintains previously added scopes.
.PP
The \fB--remove-scopes\fR flag accepts a comma separated list of scopes you
want to remove from your gh credentials. Scope removal is idempotent.
The minimum set of scopes (\fBrepo\fR, \fBread:org\fR, and \fBgist\fR) cannot be removed.
.PP
The \fB--reset-scopes\fR flag resets the scopes for your gh credentials to
the default set of scopes for your auth flow.
.PP
If you have multiple accounts in \fBgh auth status\fR and want to refresh the credentials for an
inactive account, you will have to use \fBgh auth switch\fR to that account first before using
this command, and then switch back when you are done.
.SH OPTIONS
.TP
\fB-h\fR, \fB--hostname\fR \fB<string>\fR
The GitHub host to use for authentication
.TP
\fB--insecure-storage\fR
Save authentication credentials in plain text instead of credential store
.TP
\fB-r\fR, \fB--remove-scopes\fR \fB<strings>\fR
Authentication scopes to remove from gh
.TP
\fB--reset-scopes\fR
Reset authentication scopes to the default minimum set of scopes
.TP
\fB-s\fR, \fB--scopes\fR \fB<strings>\fR
Additional authentication scopes for gh to have
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh auth refresh --scopes write:org,read:public_key
# => open a browser to add write:org and read:public_key scopes
$ gh auth refresh
# => open a browser to ensure your authentication credentials have the correct minimum scopes
$ gh auth refresh --remove-scopes delete_repo
# => open a browser to idempotently remove the delete_repo scope
$ gh auth refresh --reset-scopes
# => open a browser to re-authenticate with the default minimum scopes
.EE
.SH SEE ALSO
\fBgh-auth(1)\fR