# Sign-in codes for crates.io, NuGet.org, and GitLab CI

[Read this guide on KeySigner](https://keysigner.io/integrations/guides/set-up-registry-and-pipeline-sign-in-codes/)

Add a maintainer’s sign-in code to KeySigner, then confirm the same account still reaches your package or pipeline in a fresh browser.

## Before you start

**KeySigner on iPhone or Mac and a browser**

- Use the GitHub account linked to the crates.io test profile. Save GitHub recovery codes separately.
- Use the Microsoft account linked to the NuGet.org test profile. Confirm recovery access and whether your work or school account allows third-party authenticator codes.
- Use a GitLab test account with confirmed email and access to a test project. Save GitLab recovery codes separately.

## Data and access

- **Shared or checked**. The sign-in provider checks the maintainer code. The registry or pipeline uses the resulting identity to open the existing package or project.
- **Check separately**. Publishing trust, job permissions and runner credentials are managed independently of the maintainer’s sign-in.

## 1. Open the authenticator setup

Use a disposable maintainer account, record which account owns or can view the test resource, and confirm a separate recovery route. Keep the original browser session open during enrollment.

**Check.** You can identify the account provider and the exact account linked to the registry or project.

### Find the account that controls sign-in

- **[crates.io via GitHub](https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-totp-app)**. Use the GitHub account linked to your crates.io profile. In GitHub Settings, open Password and authentication and choose an authenticator app. Save GitHub’s recovery codes.
- **[NuGet.org via Microsoft](https://support.microsoft.com/en-gb/authenticator/how-to-add-your-accounts-to-microsoft-authenticator)**. Use the Microsoft account linked to your NuGet.org profile. For a personal account, open Security, choose Manage how I sign in, then Add a new way to sign in or verify. Choose Use an app, then Set up a different Authenticator app. For a work or school account, ask whether your organization allows third-party software codes.
- **[GitLab CI via GitLab](https://docs.gitlab.com/user/profile/account/two_factor_authentication/#register-an-otp-authenticator)**. Use a GitLab test account with a confirmed email. In Edit profile, open Access, then Password and authentication. Choose Register authenticator. GitLab asks for your current password and an authenticator code.

## 2. Add the account in KeySigner

Open Accounts, choose Add (+), then Sign-in codes and backup. Unlock Sign-in codes and choose Add account. Scan the provider’s QR code and check the label before saving. Keep the QR code and setup key private.

![The KeySigner for Mac setup screen with options to scan a QR code, pick an image, or enter a setup link.](https://keysigner.io/integrations/guides/set-up-a-time-based-sign-in-code/keysigner-add-account.png)

The KeySigner setup screen on Mac. Scan the setup code for your disposable account.

**Check.** The KeySigner entry shows the intended maintainer account.

## 3. Confirm the first code

Choose Show code in KeySigner and complete the required approvals. Enter the current code in the provider’s setup form. Store the one-time recovery codes from GitHub or GitLab in a separate place. For a Microsoft account, confirm an independent recovery method before closing the original browser session.

**Check.** The provider confirms enrollment and you can reach the recovery method separately.

## 4. Check access to the intended resource

In a private browser, sign in to the same maintainer account and choose the authenticator code method when prompted. Enter a fresh KeySigner code. For crates.io or NuGet.org, check the profile and ownership of an existing test package, if available. For GitLab CI, open the intended project’s Pipelines page and check that you can view the expected pipeline.

**Check.** The browser accepts a new code and the expected test resource is accessible.

## Check your result

Record which account asked for a code and what resource that account could access. Test a registry owner’s publishing rights and API key scope, trusted publishing, or a GitLab runner’s permissions separately.

### What we tested

**Tested on November 18, 2026.** KeySigner imported three separately generated test QR codes and produced codes that matched an independent verifier. The hosted enrollment steps follow the providers’ published instructions. Confirm access in your own test account.

[How to verify your setup](https://keysigner.io/integrations/verify-a-setup/)

## If you get stuck

### The site opens a different account or skips the code

Start with a private browser and verify the account and, for a Microsoft work or school account, the directory. Use the authenticator option if your account policy offers it. If the resource opens with the wrong identity, return to its profile or organization settings before changing any package ownership or pipeline access.

## Tools in this guide

- [crates.io](https://keysigner.io/integrations/crates-io/)
  - [Check crate ownership and rehearse publishing](https://doc.rust-lang.org/cargo/reference/publishing.html)
  - [Setup requirements](https://keysigner.io/integrations/setup-requirements/#crates-io)
- [NuGet](https://keysigner.io/integrations/nuget/)
  - [Publish a package and scope the publishing key](https://learn.microsoft.com/en-us/nuget/nuget-org/publish-a-package)
  - [Setup requirements](https://keysigner.io/integrations/setup-requirements/#nuget)
- [GitLab CI](https://keysigner.io/integrations/gitlab-ci/)
  - [Configure deployment approvals](https://docs.gitlab.com/ci/environments/deployment_approvals/)
  - [Setup requirements](https://keysigner.io/integrations/setup-requirements/#gitlab-ci)

## Setup instructions

- [See how Cargo accounts use GitHub](https://doc.rust-lang.org/cargo/reference/publishing.html#before-your-first-publish)
- [Check account requirements on NuGet.org](https://learn.microsoft.com/en-us/nuget/nuget-org/individual-accounts)
- [Enable two-step verification for a personal Microsoft account](https://support.microsoft.com/en-us/accounts-billing/security/how-to-use-two-step-verification-with-your-microsoft-account)
- [Find options for a Microsoft work or school account](https://keysigner.io/integrations/guides/set-up-workspace-account-sign-in-codes/)
- [Review crates.io and NuGet.org publishing permissions](https://keysigner.io/integrations/guides/review-crates-io-and-nuget-publishers/)
- [Review scoped NuGet.org API keys](https://learn.microsoft.com/en-us/nuget/nuget-org/scoped-api-keys)
- [Review GitLab runner configuration](https://docs.gitlab.com/ci/runners/new_creation_workflow/)
- [Test a GitLab release approval](https://keysigner.io/integrations/guides/test-a-release-approval-gate/)

[More guides for this task](https://keysigner.io/integrations/tasks/set-up-sign-in-codes/)
