Get-GitHubSecret¶
SYNOPSIS¶
Retrieve GitHub secret(s) without revealing encrypted value(s).
SYNTAX¶
AuthorizedUser (Default)¶
Get-GitHubSecret [-Name <string>] [-IncludeInherited] [-All] [-Context <Object>]
[<CommonParameters>]
Environment¶
Get-GitHubSecret -Owner <string> -Repository <string> -Environment <string> [-Name <string>]
[-IncludeInherited] [-All] [-Context <Object>] [<CommonParameters>]
Repository¶
Get-GitHubSecret -Owner <string> -Repository <string> [-Name <string>] [-IncludeInherited] [-All]
[-Context <Object>] [<CommonParameters>]
Organization¶
Get-GitHubSecret -Owner <string> [-Name <string>] [-IncludeInherited] [-All] [-Context <Object>]
[<CommonParameters>]
ALIASES¶
This cmdlet has the following aliases, {{Insert list of aliases}}
DESCRIPTION¶
Retrieves GitHub secrets from a repository, organization, or environment without exposing the actual secret values. Supports multiple contexts such as Actions, Codespaces, and Organization secrets.
The function returns an array of PSObjects containing metadata about the secrets.
EXAMPLES¶
EXAMPLE 1¶
Get-GitHubSecret -Owner PSModule -Repo Demo -Type actions
Retrieves all Actions secrets from the 'Demo' repository under the 'PSModule' organization.
EXAMPLE 2¶
Get-GitHubSecret -Owner PSModule -Type organization
Retrieves all organization-level secrets under the 'PSModule' organization.
EXAMPLE 3¶
Get-GitHubSecret -Owner PSModule -Repo Demo -Environment Staging
Retrieves all secrets for the 'Staging' environment in the 'Demo' repository under 'PSModule'.
PARAMETERS¶
-All¶
List all secrets, including those that are overwritten by inheritance.
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: ''
-Context¶
The context to run the command in. Used to get the details for the API call. Can be either a string or a GitHubContext object.
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Environment¶
The name of the environment.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Environment
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-IncludeInherited¶
List all secrets that are inherited.
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: ''
-Name¶
The name of the secret.
Type: System.String
DefaultValue: '*'
SupportsWildcards: true
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Owner¶
The account owner of the repository. The name is not case sensitive.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Organization
- User
ParameterSets:
- Name: Environment
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
- Name: Repository
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
- Name: Organization
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Repository¶
The name of the repository without the .git extension. The name is not case sensitive.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Environment
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
- Name: Repository
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
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¶
System.String¶
{{ Fill in the Description }}
OUTPUTS¶
GitHubSecret¶
{{ Fill in the Description }}