Introduction
Source control providers allow Laravel Forge to access your project’s codebase and easily deploy your applications. Forge supports most popular Git providers as well as custom / self-hosted options.
Source control providers are configured and managed within the organization’s settings.
Supported providers
Laravel Forge supports the following source control providers:
Managing source control providers
Connecting to a source control provider
To connect a source control provider, navigate to the organization’s settings. Then, on the “Source control” page, click “Add provider”. Select the provider you wish to connect to and authenticate your chosen account.
You may only configure one account from each provider at a time. If you need to connect a different account from the same provider, you must first remove the existing connection.
Removing source control providers
To unlink a source control provider, navigate to the organization’s settings. Then, on the “Source control” page, click the dropdown menu on the provider and click “Delete”.
Source control providers cannot be unlinked if an active site is using that provider.
Refreshing tokens
To refresh a source control provider token, navigate to the organization’s settings. Then, on the “Source control” page, click the dropdown menu on the provider and click “Refresh token”.
Updating source control access and permissions
To update your source control provider connection for accessing different organizations, repositories, or modifying token permissions:
- Navigate to your source control provider’s settings
- Locate and uninstall the Laravel Forge application
- Return to Laravel Forge
- Click the Refresh Token button to initiate a new OAuth authentication flow
When you need access to different organizations or repositories, refreshing the token may not grant the necessary permissions.
Following the complete OAuth authentication flow allows you to explicitly authorize access to your desired organizations and repositories with the appropriate permission scope.
Using custom Git providers
If your Git Provider is not a first-party provider, then you may use the Custom option when creating a new site on your server.
First, choose the Custom option when creating your Git based site. Next, add the generated SSH key to your source control provider and provide the full repository path ([email protected]:user/repository.git).