GitHub Connector Settings Reference
This topic provides settings and permissions for the GitHub Connector.
The unique name for this Connector.
See Tags Reference.
You can select Git Account (which is a GitHub organization) or Git Repository.
You can add a connection to your entire Git org or just a repo in the org. Selecting a Git org enables you to use one Connector for all of your subordinate repos.
Later, when you test this connection, you'll use a repo in the org.
In either case, when you use the Connector later in Harness, you'll specify which repo to use.
You can select HTTPS or SSH for the connection.
You will need to provide the protocol-relevant URL in URL.
If you use Two-Factor Authentication for your Git repo, you connect over HTTPS or SSH. HTTPS connections require a personal access token.
ssh-keygen -t rsa -m PEM
-m PEMto make sure that the algorithm and the key are PEM.
Next, follow the prompts to create the PEM key. See the ssh-keygen man page and Connecting to GitHub with SSH.
Generating an SSH key in ECDSA looks like this:
ssh-keygen -t ecdsa -b 256 -f /home/user/Documents/ECDSA/key -m pem
GitHub Repository URL
The URL for a Git org or repo. The URL format must match the Connection Type you selected --for example:
If you selected Git Repository in URL Type, enter the full URL for the repo with the format
If you selected Git Account in URL Type, enter the URL without the repo name, like
https://github.com/[org-name]. You will need to provide a repo name before you can use the Connector in Harness.
You can use a password/token for HTTPS credentials.
If you selected SSH as the connection protocol, you must add the SSH Key to use with the connection.
Your personal GitHub account username.
Personal Access Token
A Harness Encrypted Text secret for the credentials of your GitHub user account.
A Personal Access Token (PAT) is required if your GitHub authentication uses 2FA.
Typically, you can validate your token from the command line before using it in Harness. For example:
curl -i https://api.github.com -u <username>:<token>
- The GitHub user account used to create the Personal Access Token must have admin permissions on the repo.
- GitHub doesn't provide a way of scoping a PAT for read-only access to repos. You must select the following permissions:
Harness also supports GitHub deploy keys. Deploy keys grant access to a single repo. Using a deploy key ensures that the Connector only works with the specific repo you selected in URL Type.
Enable API access
This option is required for using Git-based triggers, Webhooks management, and updating Git statuses.
You can use the same token you used in Personal Access Token.
You should use the same Personal Access Token for both Authentication and API Authentication.