Class: GitUserCredential

GitUserCredential(git_remote_url, git_user_name, git_password, git_ssh_private_key)

Git User's credential

Constructor

new GitUserCredential(git_remote_url, git_user_name, git_password, git_ssh_private_key)

constructor
Parameters:
Name Type Description
git_remote_url string Git remote URL
git_user_name string Git user's name
git_password string Git password (HTTPS password/token or SSH passphrase to unlock SSH private key)
git_ssh_private_key string Git SSH private key
Source:

Methods

(static) decrypt(obj, crypt) → {GitUserCredential}

Build a GitUserCredential instance from an object (with encrypted password and SSH private key), convenient for transportation with a transport protocol, that looks like a Git user's credential
Parameters:
Name Type Description
obj Object an object
crypt Crypt a crypter
Source:
Returns:
the encrypted Git user credential
Type
GitUserCredential

(static) from(obj) → {GitUserCredential}

Build a GitUserCredential instance from an object, convenient for transportation with a transport protocol, that looks like a Git user's credential
Parameters:
Name Type Description
obj Object an object
Source:
Returns:
an instance of GitUserCredential
Type
GitUserCredential

decrypt(crypt) → {GitUserCredential}

Decrypt Git user credential (password and SSH private key)
Parameters:
Name Type Description
crypt Crypt a crypter
Source:
Returns:
the decrypted Git user credential
Type
GitUserCredential

encrypt(crypt) → {GitUserCredential}

Encrypt Git user credential (password and SSH private key)
Parameters:
Name Type Description
crypt Crypt a crypter
Source:
Returns:
the encrypted Git user credential
Type
GitUserCredential

merge(other) → {GitUserCredential}

Merge with another instance of GitUserCredential provided that the other instance is about the same Git remote URL
Parameters:
Name Type Description
other GitUserCredential another instance of GitUserCredential
Source:
Returns:
this
Type
GitUserCredential