Skip to main content
The wit repo command provides repository management operations, including transferring repositories between users and organizations.

Overview

wit repo <command> [options]

Commands

transfer

Transfer repository ownership to another user or organization.
wit repo transfer <owner/repo> <new-owner> [options]

Arguments

ArgumentDescription
owner/repoCurrent repository path (e.g., alice/myproject)
new-ownerUsername or organization slug to transfer to

Options

OptionDescription
--orgTransfer to an organization (instead of a user)

Examples

# Transfer to another user
wit repo transfer alice/myrepo bob

# Transfer to an organization
wit repo transfer alice/myrepo acme-corp --org

# Transfer from one org to another
wit repo transfer old-org/project new-org --org

Example Output

Transferring alice/myrepo to bob...

Repository transferred successfully!
  From: alice/myrepo
  To:   bob/myrepo

Note: Update your git remotes to use the new URL:
  git remote set-url origin <server>/bob/myrepo.git

Requirements

Permissions

To transfer a repository:
  1. To a user: You must be the repository owner
  2. To an organization: You must be the repository owner AND an admin/owner of the target organization

Authentication

Repository transfer requires authentication:
# Set your token
export WIT_TOKEN=your-token-here

# Or authenticate via the CLI
wit auth login

What Gets Transferred

When you transfer a repository, the following are preserved:
ItemPreserved?
All commits and branchesYes
TagsYes
Pull requestsYes
IssuesYes
CollaboratorsYes
SettingsYes
WebhooksYes
StarsNo
ForksRemain linked

Workflow Examples

Personal to Organization

Move a personal project to your company:
# Transfer the repository
wit repo transfer yourname/project company-org --org

# Update your local remote
git remote set-url origin https://wit.example.com/company-org/project.git

# Verify the new remote
git remote -v

Hand Off to New Maintainer

Transfer ownership of a project:
# Transfer to the new maintainer
wit repo transfer yourname/project newmaintainer

# They now have full ownership

Organizational Restructure

Move repositories between organizations:
# Transfer from old org to new org
wit repo transfer legacy-org/service modern-org --org

# Update CI/CD configurations
# Update documentation
# Notify team members of the new URL

After Transfer Checklist

After transferring a repository, update:
  • Local git remotes (git remote set-url origin ...)
  • CI/CD configurations (GitHub Actions, Jenkins, etc.)
  • Documentation links
  • Package registry references (npm, PyPI, etc.)
  • Dependency URLs in other projects
  • Bookmarks and saved links
  • Deployment scripts
  • Monitoring and alerting configurations

Error Handling

Common Errors

Repository not found: alice/myrepo
  • Verify the repository path is correct
  • Ensure you have access to the repository
  • Check that you’re authenticated
User not found: newuser
Organization not found: neworg
  • Verify the username or organization slug
  • Use --org flag when transferring to an organization
  • Check that the target account exists
Permission denied: Only the repository owner can transfer it.
Permission denied: You must be an admin or owner of the target organization.
  • Only repository owners can initiate transfers
  • You need admin/owner role in the target organization
  • Check your permissions in both source and target
A repository named 'project' already exists for newowner
  • The target owner already has a repository with that name
  • Rename one of the repositories before transferring
  • Or delete the existing repository if it’s not needed
Authentication required. Please log in first.
Set your authentication token:
export WIT_TOKEN=your-token-here
Or authenticate via the web UI and create a token.

Best Practices

Before transferring, inform all collaborators about the upcoming change and the new URL they’ll need to use.
If possible, update CI/CD configurations before the transfer or have them ready to deploy immediately after.
If other projects depend on this repository, plan how you’ll update those references.
After transferring, verify that:
  • Collaborators can still access the repository
  • CI/CD pipelines work with new URLs
  • Webhooks are firing correctly

Environment Variables

VariableDescription
WIT_TOKENAuthentication token for API access