Configure a Git Repo artifact account

This shows how to configure a Git Repo artifact account so Spinnaker can use an entire repository as a single artifact.

Prerequisites

  • You need a Git account.

Enable Git Repo artifacts

First, enable artifact support.

Next, enable the Git Repo artifact provider:

hal config artifact gitrepo enable

Configure Auth

Choose to set up either token, user-password or ssh key auth below.

Token Auth

  1. Generate an access token for your Git provider (eg, GitHub or GitLab). The token requires the repo scope.

  2. Place the token in a file ($TOKEN_FILE) readable by Halyard:

    echo $TOKEN > $TOKEN_FILE
    
  3. Add an artifact account:

    hal config artifact gitrepo account add $ARTIFACT_ACCOUNT_NAME \
        --token-file $TOKEN_FILE
    

User-Password Auth

  1. Create a username-password file, with contents in the following format:

    <username>:<password>
    
  2. Add an artifact account:

    hal config artifact gitrepo account add $ARTIFACT_ACCOUNT_NAME \
     --username-password-file $PASSWORD_FILE
    

SSH Key Auth

Add an artifact account:

hal config artifact gitrepo account add $ARTIFACT_ACCOUNT_NAME \
    --ssh-private-key-file-path $SSH_KEY_FILE \
    --ssh-private-key-passphrase \
    --ssh-known-hosts-file-path $KNOWN_HOSTS_FILE 

There are more options described here if you need more control over your configuration.