GitHub
When adding an application, you’ll need to select a Git provider and repository from your account. In addition to GitHub, you can also choose from Bitbucket or GitLab.
If you have a repository at another Git provider, you can import that repository into GitHub so you can connect it to your application hosted at Kinsta.
Authenticate and Authorize
The first time you add an application in MyKinsta, you’ll need to connect to a Git provider so that Kinsta can access your application’s repository. When you click the Add service button and select Add application from the dropdown menu, you’ll be prompted to choose your Git provider and connect Kinsta to your account.
![Connect Kinsta with your GitHub account.](https://kinsta.com/wp-content/uploads/2023/11/application-connect-git-1024x370.png)
If you’ve previously deployed an application and connected a different Git provider, you’ll also have the option to select GitHub in the Application details step when adding an application.
![Connect GitHub in Application details when adding an application.](https://kinsta.com/wp-content/uploads/2023/11/application-connect-github-1024x510.png)
If you aren’t currently logged in to GitHub, you’ll need to log in. On the next page, you’ll need to authenticate so you can authorize access. The last step is to authorize the Kinsta GitHub application for access to your GitHub account.
![Authorize Kinsta to connect to your GitHub account.](https://kinsta.com/wp-content/uploads/2023/11/application-authorize-mykinsta-github-789x1024.png)
Go back to MyKinsta, where you can begin adding your application and installing the Kinsta GitHub application to your repository.
Edit GitHub Permissions
In the Add application modal/pop-up, click the GitHub repository field and select Edit GitHub permissions in the dropdown.
![Edit GitHub permissions when adding an application.](https://kinsta.com/wp-content/uploads/2023/11/application-edit-github-permissions-1024x661.png)
This initiates the installation of the Kinsta GitHub application to your GitHub Account. If you have access to multiple accounts, choose the correct account to install it on.
![Install the Kinsta GitHub application to your GitHub Account.](https://kinsta.com/wp-content/uploads/2023/11/application-github-install-kinsta-1024x599.png)
You can specify exactly what this application has access to on the next screen. We aim to have as little access as possible to your data, so we recommend not giving the application access to all repositories. Click Only select repositories, and choose the repository you would like to deploy.
![Select the GitHub repository you want to deploy on Kinsta.](https://kinsta.com/wp-content/uploads/2023/11/application-select-repos-github.png)
Finally, click Save, and you’re good to go. When you go back to MyKinsta and click the GitHub repository field, you should see the authorized repository now available.
![Select the repository to deploy.](https://kinsta.com/wp-content/uploads/2023/11/application-select-repository-1024x713.png)
Remove Kinsta Access to GitHub
You can remove Kinsta’s access to your GitHub account either through MyKinsta or GitHub.
Remove Access via MyKinsta
In MyKinsta, click on your username and go to User settings > Access. In Application access, click Revoke for the GitHub application.
![The GitHub application in MyKinsta application access.](https://kinsta.com/wp-content/uploads/2023/11/application-revoke-github-access.png)
Remove Access via GitHub
In GitHub, click on your user avatar and go to Settings > Applications > Authorized GitHub Apps. Click Revoke for the MyKinsta GitHub application.
![Kinsta GitHub application in Authorized GitHub Apps.](https://kinsta.com/wp-content/uploads/2023/11/applications-github-revoke-1024x276.png)
In the confirmation modal/pop-up, click I understand, revoke access.
![Revoke access for the Kinsta GitHub application.](https://kinsta.com/wp-content/uploads/2023/11/applications-github-revoke-confirm.png)
If you try to add a new application in MyKinsta, you must authenticate and authorize the Kinsta GitHub application to reconnect it to your GitHub account.
Import a Repository to GitHub
- In GitHub, click The plus sign (+) in the upper right corner and select Import a repository.
- Copy the repository URL from your other Git provider and paste it into Your old repository’s clone URL in GitHub.
- If you are a member of an Organization in GitHub, choose an Owner for your new repository.
- Enter your Repository name.
- Choose a privacy setting for the new repository and click Begin import.
Import repository to GitHub. - If the repository at the other Git provider is private, enter your Username/Login and Password when prompted and click Submit.
Troubleshooting
Missing Repositories
If you’re having trouble seeing your repositories in the Add application modal/pop-up, you may need to re-authenticate and authorize the Kinsta GitHub application. To do that, start by removing access between Kinsta and GitHub as described above.
In MyKinsta, in the Add application modal/pop-up (Add service > Add application), go through the authenticate and authorize steps to connect Kinsta to your GitHub account again.
Conflicting Namespaces
The Conflicting namespaces
error appears when a Git account is connected to another MyKinsta user account. Your Git account can only be linked to one MyKinsta account; if you have multiple MyKinsta accounts, you must use multiple Git accounts.
To resolve this error, you must log in to your other MyKinsta account and remove Kinsta access to GitHub.