gt-repo-migrate1
Import a repository from another server
Usage
gt repo
migrate
[<clone-url>]
[flags]
Overview
Import a repository from a Git URL, or from another forge with --service (which can also copy issues, pull requests, releases and more). A private source needs --auth-token or --auth-user and --auth-password. --mirror creates a pull mirror instead. The name defaults to the last segment of the URL.
Json fields
actions_enabled, archived, clone_url, default_branch, description, empty, fork, forks_count, full_name, id, mirror, mirror_interval, name, open_issues_count, open_pr_count, original_url, parent, private, ssh_url, stars_count, template, topics, updated_at, url, website
Options
--auth-password=""
Source password (prefer file input)
--auth-password-file=""
Read source password from file or -
--auth-token=""
Source API token (prefer file input)
--auth-token-file=""
Read source API token from file or -
--auth-user=""
Source authentication username
-d, --description=""
Repository description
-h, --help[=false]
help for migrate
--issues[=false]
Copy issues
--labels[=false]
Copy labels
--lfs[=false]
Copy LFS objects
--lfs-endpoint=""
Source LFS endpoint
--milestones[=false]
Copy milestones
--mirror[=false]
Create a pull mirror
--mirror-interval=""
Mirror interval, for example 8h (0 turns off periodic sync)
--name=""
Destination repository name (default: the source's name)
--owner=""
Destination user or organization (default: your account)
--private[=false]
Make the imported repository private
--pull-requests[=false]
Copy pull requests
--releases[=false]
Copy releases
--server-path=""
Absolute source Git repository path on the Gitea server (requires server permission)
--service="git"
Source service {git|gitea|gitlab|gogs|github}
--timeout=10m0s
Maximum migration request duration; Gitea may continue an import after cancellation
--wiki[=false]
Copy wiki
Options inherited from parent commands
--csv[=""]
Output CSV with the specified comma-separated fields, or all fields
--debug[=false]
Log the method, URL, status, and duration of each HTTP request to stderr
--host=""
Gitea instance URL, including any base path
--interactive[=false]
Allow prompts with machine output
-q, --jq=""
Filter JSON output using a jq expression; implies --json
--json[=""]
Output JSON with the specified comma-separated fields, or all fields
--no-input[=false]
Disable prompts and implicit editor/browser interactions
--sudo=""
Perform API requests as this user (requires an administrator account)
--user=""
Account name on the selected instance
Examples
# Import a public Git repository $ gt repo migrate https://github.com/go-gitea/gitea.git # Mirror a repository into an organization every 8 hours $ gt repo migrate https://github.com/go-gitea/gitea.git --owner acme --mirror --mirror-interval 8h # Import a GitHub repository with its issues and pull requests $ gt repo migrate https://github.com/acme/tool --service github --issues --pull-requests --auth-token-file token.txt