Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Name

Add-JS7GitCredentials

SYNOPSIS

Adds Git credentials to the profile of the current user account

SYNTAX

Add-JS7GitCredentials [-Server] <String> [-Account] <String> [-UserName] <String> [-UserMail] <String> [[-Password] <SecureString>] [[-AccessToken] <String>] [[-KeyFile] <String>] [[-AuditComment] <String>] [[-AuditTimeSpent] <Int32>] [[-AuditTicketLink] <Uri>] [<CommonParameters>]

DESCRIPTION

This cmdlet adds Git credentials to the profile of the current user account. The functionality considers the security level:

* LOW: credentials are added to the default account, typically the root account
* MEDIUM: credentials are added per user account
* HIGH: no credentials are added

Credentials are added for one of the following authentication methods:

* Password: A larger number of Git servers is configured to deny password authentication.
* Access Token: Such tokens are created and stored with the Git Server.
* Private Key: Makes use of SSH authentication with a private key file

The following REST Web Service API resources are used:

* /inventory/repository/git/credentials/add

PARAMETERS

Server

-Server <String>
Specifies the hostname and optionally the port of the Git Server for which credentials are added.

Required?true
Position?1
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Account

-Account <String>
Specifies the Git account.

Required?true
Position?2
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

UserName

-UserName <String>
Specifies the Git user name.

Required?true
Position?3
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

UserMail

-UserMail <String>
Specifies the Git user e-mail address.

Required?true
Position?4
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Password

-Password <SecureString>
Specifies the password for Git authentication. Use of passwords is considered insecure and
a larger number of Git Servers will deny password authentication.

The password has to be specified from a SecureString data type, for example like this:

* $securePassword = ConvertTo-SecureString 'secret' -AsPlainText -Force

Required?false
Position?5
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

AccessToken

-AccessToken <String>
Specifies an access token for authentication that is configured with the Git Server.
Access tokens are a replacement for passwords and do not tend to increase security.

Required?false
Position?6
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

KeyFile

-KeyFile <String>
Specifies the path to a file that holds the private key. The corresponding public key has to be configured with the Git Server.
Use of private keys includes the following options:

* Empty path to private key file: The private key file is looked up from its default location
** Unix: ~/.ssh/id_rsa
** Windows: %USERPROFILE%/.ssh/id_rsa
* file name of private key file: The private key file is looked up from the directory JETTY_BASE/resources/joc/repositories/private
* path to private key file: The absolute path to the location of the private key file.

Required?false
Position?7
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

AuditComment

-AuditComment <String>
Specifies a free text that indicates the reason for the current intervention, e.g. "business requirement", "maintenance window" etc.

The Audit Comment is visible from the Audit Log view of the JOC Cockpit.
This parameter is not mandatory. However, the JOC Cockpit can be configured to require Audit Log comments for all interventions.

Required?false
Position?8
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

AuditTimeSpent

-AuditTimeSpent <Int32>
Specifies the duration in minutes that the current intervention required.

This information is shown in the Audit Log view. It can be useful when integrated
with a ticket system that logs the time spent on interventions with JS7.

Required?false
Position?9
Default value0
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

-AuditTicketLink <Uri>
Specifies a URL to a ticket system that keeps track of any interventions performed for JS7.

This information is shown in the Audit Log view of JOC Cockpit.
It can be useful when integrated with a ticket system that logs interventions with JS7.

Required?false
Position?10
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

about_JS7

EXAMPLES

-------------------------- EXAMPLE 1 --------------------------

PS > $securePassword = ConvertTo-SecureString 'secret' -AsPlainText -Force
Add-JS7GitCredentials -Server github.com -Account someone -Password $secureString

Adds credentials for access to a Git Server by password authentication.

-------------------------- EXAMPLE 2 --------------------------

PS > Add-JS7GitCredentials -Server github.com -Account someone -KeyFile /home/sos/git_rsa

Adds credentials for access to a Git Server using a private key file specified by its absolute path.