.nh .TH "GH-AUTH-REFRESH" "1" "Mar 2024" "" "GitHub CLI manual" .SH NAME .PP gh-auth-refresh - Refresh stored authentication credentials .SH SYNOPSIS .PP \fBgh auth refresh [flags]\fR .SH DESCRIPTION .PP 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\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\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\fR Additional authentication scopes for gh to have .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 .PP \fBgh-auth(1)\fR