MetaLens360Help Center

Connect a Git repository

Add a GitHub, Bitbucket or Azure DevOps repository with a read-only token so MetaLens360 can correlate deployed metadata with commits and branches.

Updated in Connections & sync

Overview

Connecting your source repository lets MetaLens360 read commits and branches and link them to what is actually deployed in your orgs. It powers repository insights, branch comparisons and the promotion pipeline. MetaLens360 only reads the repository — read-only access is enough, and it never writes to it.

Before you start

  • You need the Manage org/Git connections permission (Admin, Architect and DevOps roles by default).
  • Create a token with read access for your provider:
    • GitHub classic token: the repo scope. Fine-grained token: set Resource owner to the organization that owns the repository (not your personal account), with Contents and Pull requests set to Read-only.
    • Bitbucket app password: "Repositories: Read".
    • Azure DevOps personal access token: "Code (Read)".
  • If your GitHub organization uses SAML SSO, authorize the token for it: on GitHub's token page click Configure SSO → Authorize next to the token.

Steps

  1. Open Connections and click Add Git Repo. The Add Git Repository Connection dialog opens with three steps: Repository, Access, Confirm.
  2. In Repository URL, paste the repository's web address, for example https://github.com/acme/salesforce-core. MetaLens360 fills in Provider, Owner / Org and Repository Name for you. Check them.
  3. Enter a Display Name — how the repository appears in MetaLens360 — and click Continue.
  4. Paste your token into Personal Access Token.
  5. For GitHub, click Verify access (or Continue, which runs the same check). A Connection check list shows each check with a fix for anything that failed. Nothing is saved until every check passes.
  6. On the Confirm step, pick the Default Branch — the branch MetaLens360 reads by default. If no branch list was returned, type the branch name.
  7. Click Add Repository. The repository appears on the Git Repositories tab.
  8. Click Test on the repository row. You should see "Connected! N branches found."

Example

Ravi, a DevOps engineer, connects acme/salesforce-core. He creates a fine-grained token with Resource owner set to the acme organization and Contents + Pull requests read-only. The Connection check flags SSO, so he clicks Authorise for acme →, approves it on GitHub, presses Verify access again, picks main as the default branch and clicks Add Repository.

FAQs

Can I change the token later?

Yes. Click the edit icon on the repository and enter a new value in New Token (leave blank to keep existing), then Save Changes.

Who can test a repository connection?

Anyone with the Test connections permission (connections.test) — every role except Viewer by default.

Does MetaLens360 need write access?

No. Read access to contents (and pull requests on GitHub) is all it uses.

Troubleshooting

GitHub says the repository is "404 not found" but the name is right

This is almost always SAML SSO. The token must be authorized for the organization. Use Configure SSO → Authorize on GitHub, then verify again.

"Could not read an owner and repository from that URL — fill them in below."

The URL wasn't in a recognized format. Type the Owner / Org and Repository Name fields yourself.

A fine-grained token can't see the repository

Its resource owner is probably your personal account. Create a new token with the organization as the resource owner.

For more fixes, see Fix Git repository access.

Was this article helpful?

Related articles