Safeguard
Security Guides•

What happens when you transfer a repo to a client, and what to rotate?

A GitHub repo transfer keeps issues, history, webhooks, secrets and deploy keys. Here is what that means for rotation, Pages and local clones at handover.

Safeguard Security Team
3 min read

A GitHub transfer moves history, issues, pull requests and the wiki, and keeps webhooks, secrets and deploy keys associated. That is exactly why you must rotate credentials afterward. Anything the agency created still works until revoked. Also update local clones and check Pages and custom domain settings.

What the documentation says moves

GitHub's guide on transferring a repository lists what carries over.

  • Issues, pull requests, wiki, stars and watchers.
  • Webhooks, services, secrets and deploy keys, which "will remain associated after the transfer is complete."
  • Git history, commit contributions and Git LFS objects.
  • Forks stay linked.
  • Actions secrets carry over.

What needs attention

  • Local clones. Update the remote URL on every agency machine, or better, delete the clones.
  • GitHub Pages. Repository links redirect, but Pages sites are not redirected. If a custom domain is in use, review DNS before the move to avoid domain takeover risk.
  • Collaborators. The original owner becomes a collaborator. Remove them.
  • Features by plan. Moving a private repo to a free account can remove features such as protected branches and Pages.
  • Packages. They may lose their repository link depending on the registry.
  • Retired names. In some cases, such as repositories with many clones or Actions uses, the old owner and name combination is retired permanently.

The rotation list

Because secrets and deploy keys stay attached, treat the transfer as the start of cleanup rather than the end.

ItemAction
Actions secretsReissue under client-owned credentials, then update
Deploy keysReplace with client-generated keys
WebhooksReview each endpoint, remove agency ones
Personal access tokensRevoke any agency staff tokens used by CI
Registry tokensReplace as in the private registry post
Hosting and DNS accessConfirm client ownership
Collaborators and teamsRemove agency accounts that no longer need access

Order of operations

  1. Agree a window. Freeze merges.
  2. Run a final dependency audit and export an SBOM.
  3. Transfer the repository.
  4. Client creates new secrets and deploy keys.
  5. Run a full build and deploy from the client's side.
  6. Agency revokes old credentials.
  7. Both sides record the date and what was rotated.

Step 5 before step 6 avoids an outage. Step 6 must not be skipped. Credentials that stay alive after the relationship ends are a classic source of incidents.

Keep a record

A short note in the handover pack is enough: date, who transferred, what was rotated, what remains agency owned (for example, a shared design tool), and who to contact. See what an agency should hand over for the wider pack.

Quick check

Should the agency keep read access afterward?

Only if the client asks and the maintenance agreement says so. Make it a named account with an expiry date.

Do forks and local copies need cleanup?

Yes. Agency staff should delete local clones and personal forks of private client code at the end of the engagement.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.