> For the complete documentation index, see [llms.txt](https://docs.onepub.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onepub.dev/guides/ci-cd/trusted-publishers-beta.md).

# Trusted Publishers - Beta

OnePub supports Trusted Publisher allowing you to publishing directly from your preferred CI/CD provider without using a token.

A Trusted Provider, using OIDC, can be 'paired' with OnePub on a per package basis. This simplifies the publishing process while enhancing security by removing the need for long lived security tokens.

OnePub supports the following Publishers:

* GitHub
* GitLab
* Bitbucket
* CircleCI
* Azure Pipelines

Once a Trusted Provider is paired to OnePub, publish a package from your CI/CD pipeline use:

```
dart pub global activate onepub
onepub login trusted
dart pub publish --force
```

## Establishing Trust

To setup a Trusted Provider, you must 'pair' the provider with **each** **package** that you will publish to OnePub.

Log in to the OnePub website: <https://onepub.dev>

Navigate to: My OnePub | Managed Packages

Select the package you want to publish.

On the right hand side of the screen, select the 'Trusted publishing' tab.

<figure><img src="https://2164893338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJazaE7yAHIXZjE9ucSqu%2Fuploads%2FVr4J7kE1P44T5fetmc01%2Fimage.png?alt=media&amp;token=42947d92-9be3-4ef0-9072-b712426e21eb" alt=""><figcaption></figcaption></figure>

Click 'New Publisher'.

Select the provider from which you run you CI/CD pipeline.

The 'Help' tab on the right-hand side of your screen provides details about configuring each supported Publisher.

<figure><img src="https://2164893338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJazaE7yAHIXZjE9ucSqu%2Fuploads%2FpMCrqpFXDdB5rj7p0CXL%2Fimage.png?alt=media&amp;token=5ac01990-1a63-4490-b0c9-f515b43990e8" alt=""><figcaption></figcaption></figure>

Once you have entered all of the required details click the 'Save' button.

If you have an existing CI/CD pipeline then remove the `onepub import` command and replace it with `onepub login trusted`

You can also remove the OnePub token from your environment settings.  We also recommend that you disable your OnePub CI/CD account to prevent it being used.&#x20;

You can now trigger your CI/CD pipeline.

Repeat the above process for each of your packages that are published into OnePub.
