# GitHub

## GitHub Artifacts Account <a href="#github-artifacts-account" id="github-artifacts-account"></a>

* Spinnaker can be configured to listen to changes to a repository in GitHub. These steps show you how to configure a GitHub artifact account so that Spinnaker can download files from GitHub.

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* It’s mandatory to have a valid GitHub Account.

### Downloading GitHub Credentials: <a href="#downloading-github-credentials" id="downloading-github-credentials"></a>

* Follow the below steps to generate an Access Token for GitHub. Ensure to provide repo scope for the newly created Token.
* Place the token in a file $TOKEN\_File readable by Halyard:

  ```
      echo $TOKEN &gt; $TOKEN_FILE
  ```

### Enable GitHub Artifact Settings <a href="#enable-github-artifact-settings" id="enable-github-artifact-settings"></a>

* Ensure to have the following values enabled

  ```
      # See the prerequisites section above
      TOKEN_FILE=

      ARTIFACT_ACCOUNT_NAME=my-github-artifact-account
  ```
* Ensure to have the GitHub Artifacts Support is enabled on Spinnaker

  ```
      hal config features edit --artifacts true
      hal config artifact github enable
  ```
* Execute the following command to add an Artifact Account

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

**Note**: To Explore more options on this configuration, click [here](https://www.spinnaker.io/reference/halyard/commands/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opsmx.com/opsmx-context-graph-and-data-fabric/additional-resources/previous-releases/isd-3.12/orchestration-module-opsmx-enterprise-for-spinnaker-oes/additional-feature-configuration/configure-artifact-support/github.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
