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. Each account you authenticate is stored as an independent connection, and a single organization may hold many connections at once, including multiple connections for the same provider.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 connect the same provider more than once. For example, you can add a personal GitHub account alongside a work account, or connect GitLab accounts with access to different groups. Each authenticated account becomes its own connection and is managed independently. When you keep several connections for the same provider, use the “Rename” action to give each one a memorable label so you can tell them apart when creating a site.Managing a connection
Each connection has a dropdown menu on the “Source control” page. The available actions depend on the provider, and may include:- View sites: list the sites that are currently deploying from this connection.
- Verify connection: confirm the connection’s token is still valid and can reach your repositories.
- Reconnect: re-run the OAuth flow to refresh the token or grant access to additional organizations and repositories.
- Manage GitHub access: open GitHub to adjust which repositories the Forge application can access.
- Rename: give the connection a custom label. This is especially useful when you have several connections for the same provider.
- Edit: update connection settings (available for connection types such as self-hosted GitLab).
- Copy ID: copy the connection’s ID.
- Delete: remove the connection.
Removing a connection
To unlink a connection, navigate to the organization’s settings. Then, on the “Source control” page, click the dropdown menu on the connection and click “Delete”.Reconnecting and updating access
To refresh a connection’s token, or to grant Forge access to different organizations, repositories, or permission scopes, use the Reconnect action on the connection’s dropdown menu. This re-runs the full OAuth authentication flow so you can explicitly authorize the access you need. If reconnecting does not surface the organizations or repositories you expect, the underlying provider authorization may need to be reset first:- Navigate to your source control provider’s settings.
- Locate and uninstall (or revoke access for) the Laravel Forge application.
- Return to Laravel Forge.
- Click Reconnect to initiate a fresh OAuth authentication flow, then authorize the desired organizations and repositories.
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 theCustom option when creating your Git based site. Next, add the generated SSH key to your source control provider and provide the full repository path (git@provider.com:user/repository.git).
Custom Git sites cannot use push to deploy, because Forge cannot register a deployment webhook on an arbitrary Git host. If your repository is hosted on a first-party provider you later connect, you can switch the site over from its Git settings to enable push to deploy and the other provider-aware features.