Use the procedures on this page to control the connection between your GitHub repository and the optional Pipelines command-line client. If you prefer to use your web browser to connect Cloud Platform to GitHub, see Connecting an application to an external Git repo.
To configure the Pipelines client integration with GitHub (both to connect and disconnect), you must have the following items:
For information about obtaining these items from GitHub, see Obtaining required GitHub information.
To configure the Pipelines client to use a GitHub repository as the
source, run the pipelines github-connect
command as a user with the
necessary GitHub permission for the GitHub
repository.
Use the following command to connect the Pipelines client to GitHub:
pipelines github-connect --application-id=[Acquia app ID] [GitHub user/GitHub repo-name] [GitHub token]
where
[Acquia app ID]
is your Cloud Platform application ID.
[GitHub user/GitHub repo-name]
is your GitHub user name and the
name of the GitHub repository that will be the source repository for
build jobs. You can find this in GitHub by selecting the repository
and looking in the URL bar or on the repository’s main page.
[GitHub token]
is a GitHub personal access token that
you generate.
After you have run pipelines github-connect
, the GitHub repository
that you specify in pipelines github-connect
becomes the default
source repository for Pipelines build jobs.
Each time that you use GitHub to create or reopen a pull request, push a
commit, or push a tag, Cloud Platform runs the pipelines start
command using
the build definition file in the GitHub repository, and commits the build
artifact to your Cloud Platform repository.
When you run pipelines github-connect
, the Pipelines client adds a
webhook to your GitHub repository.
To view the webhook in GitHub:
The Pipelines client also creates a deploy key in your GitHub repository, which gives the client permission to interact with your repository.
To see the deploy key in GitHub:
To disconnect the Pipelines client from a GitHub repository, run the following command:
pipelines github-disconnect --application-id=[Acquia app ID] [GitHub user/GitHub repo-name] [GitHub token]
where
[Acquia app ID]
is your Cloud Platform application ID.[GitHub user/GitHub repo-name]
is your GitHub user name and the
name of the GitHub repository that is the source repository for build
jobs. You can find this in GitHub by selecting the repository and
looking in the URL bar or on the repository’s main page.[GitHub token]
is a GitHub personal access token that
you generate.Disconnecting your GitHub repository from the Pipelines client also removes the webhook and deploy key added by the connection of the two services.