Get-GitHubApiKey
SYNOPSIS
Gets the stored GitHub token
SYNTAX
__AllParameterSets
Get-GitHubApiKey [-AsPlainText]
ALIASES
This cmdlet has the following aliases,
- Get-GHApiKey
DESCRIPTION
The Get-GitHubApiKey function returns the token stored with Add-GitHubApiKey (or imported from the saved settings file). By default the token is returned as a SecureString
Tokens that come from $env:GITHUB_TOKEN or $env:GH_TOKEN are not returned by this function
EXAMPLES
EXAMPLE 1
Get-GitHubApiKey
Returns the token as a SecureString
EXAMPLE 2
Get-GitHubApiKey -AsPlainText
Returns the token as plain text
PARAMETERS
-AsPlainText
Decrypt & return the token as plain text
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
Aliases: Get-GHApiKey
A warning is written when no token is stored