skipcheck

TM1 client · Docs · More services

GitCredentials

import { GitCredentials } from "@skipcheck/tm1-client";

How TM1 signs in to the Git remote: nothing (a public or git:// remote), a user name and password or token (HTTPS), or an SSH key pair. TM1 doesn't keep them, so every call that reaches the remote takes them again. toString leaves the secrets out.

Members

GitCredentials constructorHow TM1 signs in to the Git remote.
none staticNo credentials.
password staticA user name and password, or access token, for an HTTPS remote.
sshKey staticAn SSH key pair, for an SSH remote, and the private key's passphrase, if it has one.
username propertyThe user name, for HTTPS.
password propertyThe password or access token, for HTTPS.
publicKey propertyThe SSH public key.
privateKey propertyThe SSH private key.
passphrase propertyThe private key's passphrase.
addTo@internal The parameters TM1 takes them as, those set only.
equalsWhether other holds the same credentials.
toStringWhich credentials these are, without the secrets.
toJSONWhat JSON.stringify writes.
[INSPECT]What Node's util.inspect (and so console.log) shows.

GitCredentials

constructor
constructor( username: string | null | undefined, password: string | null | undefined, publicKey: string | null | undefined, privateKey: string | null | undefined, passphrase: string | null | undefined, )

How TM1 signs in to the Git remote: nothing (a public or git:// remote), a user name and password or token (HTTPS), or an SSH key pair. TM1 doesn't keep them, so every call that reaches the remote takes them again. toString leaves the secrets out. @param username the user name, for HTTPS @param password the password or access token, for HTTPS @param publicKey the SSH public key @param privateKey the SSH private key @param passphrase the private key's passphrase

none

static
static none(): GitCredentials

No credentials.

password

static
static password(username: string, password: string): GitCredentials

A user name and password, or access token, for an HTTPS remote.

sshKey

static
static sshKey(publicKey: string, privateKey: string, passphrase?: string | null): GitCredentials

An SSH key pair, for an SSH remote, and the private key's passphrase, if it has one.

username

property
username: string | null

The user name, for HTTPS.

password

property
password: string | null

The password or access token, for HTTPS.

publicKey

property
publicKey: string | null

The SSH public key.

privateKey

property
privateKey: string | null

The SSH private key.

passphrase

property
passphrase: string | null

The private key's passphrase.

addTo

addTo(parameters: Record<string, unknown>): void

@internal The parameters TM1 takes them as, those set only.

equals

equals(other: unknown): boolean

Whether other holds the same credentials.

toString

toString(): string

Which credentials these are, without the secrets.

toJSON

toJSON(): string

What JSON.stringify writes: toString, without the secrets.

[INSPECT]

[INSPECT](): string

What Node's util.inspect (and so console.log) shows: toString.