Skip to content

Get-GitHubUserKey

SYNOPSIS

List public SSH keys for a given user or the authenticated user.

SYNTAX

__AllParameterSets (Default)

Get-GitHubUserKey [-PerPage <int>] [-Context <Object>] [<CommonParameters>]

Username

Get-GitHubUserKey -Username <string> [-PerPage <int>] [-Context <Object>] [<CommonParameters>]

Me

Get-GitHubUserKey [-ID <string>] [-PerPage <int>] [-Context <Object>] [<CommonParameters>]

ALIASES

This cmdlet has the following aliases, {{Insert list of aliases}}

DESCRIPTION

Lists a given user's or the current user's public SSH keys. For the authenticated users keys, it requires that you are authenticated via Basic Auth or via OAuth with at least read:public_key scope. Keys from a given user are accessible by anyone.

EXAMPLES

EXAMPLE 1

Get-GitHubUserKey

Gets all GPG keys for the authenticated user.

EXAMPLE 2

Get-GitHubUserKey -ID '1234567'

Gets the public SSH key with the ID '1234567' for the authenticated user.

EXAMPLE 3

Get-GitHubUserKey -Username 'octocat'

Gets all GPG keys for the 'octocat' user.

PARAMETERS

-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: ''

-ID

The ID of the GPG key.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- gpg_key_id
ParameterSets:
- Name: Me
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-PerPage

The number of results per page (max 100).

Type: System.Nullable`1[System.Int32]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Username

The handle for the GitHub user account.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Username
  Position: Named
  IsRequired: true
  ValueFromPipeline: true
  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

System.Management.Automation.PSObject

{{ Fill in the Description }}

NOTES

List GPG keys for the authenticated user