This is a standalone Go tool to allow you to sync from [GitHub](https://www.github.com) to a [GitHub Enterprise instance](https://github.com/enterprise). GitHub Enterprise is referred to as `GHES` throughout this document.
A personal access token to authenticate against the GHES instance when uploading repositories. See [Destination token scopes](#destination-token-scopes) below.
A single repository to be synced. In the format of `owner/repo`. Optionally if you wish the repository to be named different on your GHES instance you can provide an alias in the format: `upstream_owner/upstream_repo:destination_owner/destination_repo`
When no machine has access to both the public internet and the GHES instance:
1.`actions-sync pull` on a machine with public internet access
2. copy the provided `cache-dir` to a machine with access to the GHES instance
3. run `actions-sync push` on the machine with access to the GHES instance
**Command:**
`actions-sync pull`
**Arguments:**
-`cache-dir`_(required)_
The directory to cache the pulled repositories into.
-`repo-name`_(optional)_
A single repository to be synced. In the format of `owner/repo`. Optionally if you wish the repository to be named different on your GHES instance you can provide an aliase in the format: `upstream_owner/up_streamrepo:destination_owner/destination_repo`
-`repo-name-list`_(optional)_
A comma-separated list of repositories to be synced. Each entry follows the format of `repo-name`.
-`repo-name-list-file`_(optional)_
A path to a file containing a newline separate listof repositories to be synced. Each entry follows te format of `repo-name`.
**Example Usage:**
```
bin/actions-sync pull \
--cache-dir "/tmp/cache" \
--repo-name actions/setup-node
```
**Command:**
`actions-sync push`
**Arguments:**
-`cache-dir`_(required)_
The directory containing the repositories fetched using the `pull` command.
-`destination-url`_(required)_
The URL of the GHES instance to sync repositories onto.
A personal access token to authenticate against the GHES instance when uploading repositories. See [Destination token scopes](#destination-token-scopes) below.
-`repo-name`, `repo-name-list` or `repo-name-list-file`_(optional)_
Limit push to specific repositories in the cache directory.
When creating a personal access token include the `repo` and `workflow` scopes. Include the `site_admin` scope (optional) if you want organizations to be created as necessary.