This topic tells you how to enable and use GitHub repository creation in the Application Accelerator plug-in of Tanzu Developer Portal.
The Application Accelerator plug-in uses the Backstage GitHub provider integration and the authentication mechanism to retrieve an access token. Then it can interact with the provider API to create GitHub repositories.
The supported Git providers are GitHub and GitLab.
NoteTo create a repository in a self-hosted GitLab, you must add a custom GitLab integration in
tap-values.yaml
as described in the Full Profile sample.
The following steps describe an example configuration that uses GitHub:
Create an OAuth App in GitHub based on the configuration described in this Backstage documentation. GitHub Apps are not supported. For more information about creating an OAuth App in GitHub, see the GitHub documentation.
These values appear in your app-config.yaml
or app-config.local.yaml
for local development. For example:
auth:
environment: development
providers:
github:
development:
clientId: GITHUB-CLIENT-ID
clientSecret: GITHUB-CLIENT-SECRET
Add a GitHub integration in your app-config.yaml
configuration. For example:
app_config:
integrations:
github:
- host: github.com
For more information, see the Backstage documentation.
As of Tanzu Application Platform v1.5, you can deactivate Git repository creation by setting the property customize.features.accelerators.gitRepoCreation
to false
in tap-values.yaml
. This also deactivates Git repository creation in the Application Accelerator extension for VS Code.
See the following example configuration for deactivating Git repository creation:
app_config:
customize:
features:
accelerators:
gitRepoCreation: false
To create a project:
Go to Tanzu Developer Portal, access the Accelerators section, and then select an accelerator. The accelerator form now has a second step named Git repository.
Fill in the accelerator options and click Next.
Select the Create Git repo? check box.
Fill in the Owner, Repository, and Default Branch text boxes.
After entering the repository name, a dialog box appears that requests GitHub credentials. Log in and then click Next.
Click GENERATE ACCELERATOR. A link to the repository location appears.