# Phabricator

<TierCallout>
	Supported on [Enterprise](/pricing/plans/enterprise) plans.
	<user>Available via the Web app.</user>
</TierCallout>

Site admins can associate Git repositories on [Phabricator](https://phabricator.org) with Sourcegraph so that users can jump to the Phabricator repository from Sourcegraph and use the [Phabricator extension](#native-extension) and [browser extension](/integration/browser-extension) with Phabricator.

> ⚠️ NOTE: Sourcegraph support of Phabricator is limited ([learn more](/integration/phabricator)), and not expected to evolve due to the [announced](https://admin.phacility.com/phame/post/view/11/phacility_is_winding_down_operations/) cease of support for Phabricator.

To connect Phabricator to Sourcegraph:

1. Go to **Site admin > Manage code hosts > Add repositories**
1. Select **Phabricator**.
1. Configure the connection to Phabricator using the action buttons above the text field, and additional fields can be added using `Cmd/Ctrl+Space` for auto-completion. See the [configuration documentation below](#configuration).
1. Press **Add repositories**.

## Repository association

Sourcegraph can provide users with links to various Phabricator pages (for files, commits, branches, etc.) if you add Phabricator as a connection (in **Site admin > Manage code hosts**).

A Phabricator configuration consists of the following fields:

-   `url` field that maps to the url of the Phabricator host
-   `token` an optional Conduit API token, which you may generate from the Phabricator web interface. The token is used to fetch the list of repos available on the Phabricator installation
-   `repos` if your Phabricator installation mirrors repositories from a different origin than Sourcegraph, you must specify a list of repository `path`s (as displayed on Sourcegraph) and their corresponding Phabricator `callsign`s. For example: `[{ path: 'gitolite.example.org/foobar', callsign: 'FOO'}]`. _Note that the `callsign` is case sensitive._

At least one of `token` and `repos` should be provided.

For example:

```json
{
	// ...
	"phabricator": [
		{
			"url": "https://phabricator.example.com",
			"token": "api-abcdefghijklmnop",
			"repos": [{"path": "gitolite.example.com/mux", "callsign": "MUX"}]
		}
	]
	// ...
}
```

See [configuration documentation](#configuration) below for more information.

### Troubleshooting

If your outbound links to Phabricator are not present or not working, verify your Sourcegraph repository path matches the "normalized" URI output by Phabricator's `diffusion.repository.search` conduit API.

For example, if you have a repository on Sourcegraph whose URL is `https://sourcegraph.example.com/path/to/repo` then you should see a URI returned from `diffusion.repository.search` whose `normalized` field is `path/to/repo`. Check this by navigating to `$PHABRICATOR_URL/conduit/method/diffusion.repository.search/` and use the "Call Method" form with `attachments` field set to `{ "uris": true }` and `constraints` field set to `{ "callsigns": ["$CALLSIGN_FOR_REPO_ON_SOURCEGRAPH"]}`. In the generated output, verify that the first URI has a normalized path equal to `path/to/repo`.

## Native extension

For production usage, we recommend installing the Sourcegraph Phabricator extension for all users (so that each user doesn't need to install the browser extension individually). This involves adding a new extension to the extension directory of your Phabricator instance.

See the [phabricator-extension](https://github.com/sourcegraph/phabricator-extension) repository for installation instructions and configuration settings.

The Sourcegraph instance's site admin must [update the `corsOrigin` site config property](/admin/config/site-config) to allow the Phabricator extension to communicate with the Sourcegraph instance. For example:

```json
{
	// ...
	"corsOrigin": "https://my-phabricator.example.com"
	// ...
}
```

## Configuration

{/* <div markdown-func=jsonschemadoc jsonschemadoc:path="admin/code_hosts/phabricator.schema.json">[View page on our docs](/admin/code-hosts/phabricator) to see rendered content.</div> */}

### admin/code_hosts/phabricator.schema.json

{/* SCHEMA_SYNC_START: admin/code_hosts/phabricator.schema.json */}
{/* WARNING: This section is auto-generated during releases. Do not edit manually. */}
{/* Last updated: 2026-03-31T22:10:15Z */}
```json
{
	// SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`.
	"gitSSHCipher": null,

	// SSH keys to use when cloning Git repo.
	"gitSSHCredential": null,

	// The type of Git URLs to use for cloning and fetching Git repositories.
	// Valid options: "http", "ssh"
	"gitURLType": "http",

	// The list of repositories available on Phabricator.
	"repos": null,

	// API token for the Phabricator instance.
	"token": null,

	// URL of a Phabricator instance, such as https://phabricator.example.com
	// Other example values:
	// - "https://phabricator.example.com"
	"url": null
}
```
{/* SCHEMA_SYNC_END: admin/code_hosts/phabricator.schema.json */}
