Merge branch 'main' into codewithdev-ui-changes
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 15 KiB |
BIN
assets/images/help/profile/collapsed-section-example.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
assets/images/help/profile/edit-profile-readme.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
assets/images/help/profile/lightmode-image-example.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
assets/images/help/profile/markdown-quote-example.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
assets/images/help/profile/markdown-table-example.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
assets/images/help/profile/readme-commit-changes.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
@@ -24,7 +24,7 @@ You decide what information to include in your profile README, so you have full
|
||||
|
||||

|
||||
|
||||
You can format text and include emoji, images, and GIFs in your profile README by using {% data variables.product.company_short %} Flavored Markdown. For more information, see "[Getting started with writing and formatting on {% data variables.product.prodname_dotcom %}](/github/writing-on-github/getting-started-with-writing-and-formatting-on-github)."
|
||||
You can format text and include emoji, images, and GIFs in your profile README by using {% data variables.product.company_short %} Flavored Markdown. For more information, see "[Getting started with writing and formatting on {% data variables.product.prodname_dotcom %}](/github/writing-on-github/getting-started-with-writing-and-formatting-on-github)." For a hands-on guide to customizing your profile README, see "[Quickstart for writing on {% data variables.product.prodname_dotcom %}](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github)."
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
||||
@@ -42,11 +42,11 @@ Most often, the author date and commit date are the same but you may notice that
|
||||
You can use the `git show` command with the `--pretty=fuller` flag to check if the commit author date and commit date are different.
|
||||
|
||||
```shell
|
||||
$ git show <em>Your commit SHA number</em> --pretty=fuller
|
||||
commit <em>Your commit SHA number</em>
|
||||
Author: octocat <em>user email</em>
|
||||
$ git show YOUR_COMMIT_SHA_NUMBER --pretty=fuller
|
||||
commit YOUR_COMMIT_SHA_NUMBER
|
||||
Author: octocat USER_EMAIL
|
||||
AuthorDate: Tue Apr 03 02:02:30 2018 +0900
|
||||
Commit: Sally Johnson <em>user email</em>
|
||||
Commit: Sally Johnson USER_EMAIL
|
||||
CommitDate: Tue Apr 10 06:25:08 2018 +0900
|
||||
```
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ During set up, you may have [set your username in Git](/github/getting-started-w
|
||||
```shell
|
||||
$ git config user.name
|
||||
# View the setting
|
||||
<em>YOUR_USERNAME</em>
|
||||
YOUR_USERNAME
|
||||
```
|
||||
|
||||
## Finding your username in the URL of remote repositories
|
||||
@@ -60,11 +60,11 @@ If you have any local copies of personal repositories you have created or forked
|
||||
{% endtip %}
|
||||
|
||||
```shell
|
||||
$ cd <em>YOUR_REPOSITORY</em>
|
||||
$ cd YOUR_REPOSITORY
|
||||
# Change directories to the initialized Git repository
|
||||
$ git remote -v
|
||||
origin https://{% data variables.command_line.codeblock %}/<em>YOUR_USERNAME</em>/<em>YOUR_REPOSITORY</em>.git (fetch)
|
||||
origin https://{% data variables.command_line.codeblock %}/<em>YOUR_USERNAME</em>/<em>YOUR_REPOSITORY</em>.git (push)
|
||||
origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_REPOSITORY.git (fetch)
|
||||
origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_REPOSITORY.git (push)
|
||||
```
|
||||
|
||||
Your user name is what immediately follows the `https://{% data variables.command_line.backticks %}/`.
|
||||
|
||||
@@ -51,7 +51,7 @@ To ensure that commits are attributed to you and appear in your contributions gr
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you created your account on {% data variables.product.product_location %} _after_ July 18, 2017, your `noreply` email address for {% data variables.product.product_name %} is a seven-digit ID number and your username in the form of <code><em>ID+username</em>@users.noreply.github.com</code>. If you created your account on {% data variables.product.product_location %} _prior to_ July 18, 2017, your `noreply` email address from {% data variables.product.product_name %} is <code><em>username</em>@users.noreply.github.com</code>. You can get an ID-based `noreply` email address for {% data variables.product.product_name %} by selecting (or deselecting and reselecting) **Keep my email address private** in your email settings.
|
||||
**Note:** If you created your account on {% data variables.product.product_location %} _after_ July 18, 2017, your `noreply` email address for {% data variables.product.product_name %} is a seven-digit ID number and your username in the form of <code>ID+USERNAME@users.noreply.github.com</code>. If you created your account on {% data variables.product.product_location %} _prior to_ July 18, 2017, your `noreply` email address from {% data variables.product.product_name %} is <code>USERNAME@users.noreply.github.com</code>. You can get an ID-based `noreply` email address for {% data variables.product.product_name %} by selecting (or deselecting and reselecting) **Keep my email address private** in your email settings.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
@@ -76,7 +76,7 @@ You can use the `git config` command to change the email address you associate w
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
2. {% data reusables.user-settings.set_your_email_address_in_git %}
|
||||
```shell
|
||||
$ git config --global user.email "<em>email@example.com</em>"
|
||||
$ git config --global user.email "YOUR_EMAIL"
|
||||
```
|
||||
3. {% data reusables.user-settings.confirm_git_email_address_correct %}
|
||||
```shell
|
||||
@@ -95,7 +95,7 @@ You can change the email address associated with commits you make in a single re
|
||||
2. Change the current working directory to the local repository where you want to configure the email address that you associate with your Git commits.
|
||||
3. {% data reusables.user-settings.set_your_email_address_in_git %}
|
||||
```shell
|
||||
$ git config user.email "<em>email@example.com</em>"
|
||||
$ git config user.email "YOUR_EMAIL"
|
||||
```
|
||||
4. {% data reusables.user-settings.confirm_git_email_address_correct %}
|
||||
```shell
|
||||
|
||||
@@ -39,5 +39,5 @@ If you've been collaborating professionally with another person on repositories
|
||||
- Delete local copies of your forks that may exist on your computer:
|
||||
|
||||
```shell
|
||||
$ rm -rf <em>work_directory</em>
|
||||
$ rm -rf WORK_DIRECTORY
|
||||
```
|
||||
|
||||
@@ -49,7 +49,7 @@ Create secrets in your repository or organization for the following items:
|
||||
- Use the following command to convert your certificate to Base64 and copy it to your clipboard:
|
||||
|
||||
```shell
|
||||
base64 <em>build_certificate</em>.p12 | pbcopy
|
||||
base64 BUILD_CERTIFICATE.p12 | pbcopy
|
||||
```
|
||||
* The password for your Apple signing certificate.
|
||||
- In this example, the secret is named `P12_PASSWORD`.
|
||||
@@ -63,7 +63,7 @@ Create secrets in your repository or organization for the following items:
|
||||
- Use the following command to convert your provisioning profile to Base64 and copy it to your clipboard:
|
||||
|
||||
```shell
|
||||
base64 <em>provisioning_profile.mobileprovision</em> | pbcopy
|
||||
base64 PROVISIONING_PROFILE.mobileprovision | pbcopy
|
||||
```
|
||||
|
||||
* A keychain password.
|
||||
|
||||
@@ -63,7 +63,7 @@ By default, self-hosted runners will automatically perform a software update whe
|
||||
To turn off automatic software updates and install software updates yourself, specify the `--disableupdate` flag when registering your runner using `config.sh`. For example:
|
||||
|
||||
```shell
|
||||
./config.sh --url <em>https://github.com/octo-org</em> --token <em>example-token</em> --disableupdate
|
||||
./config.sh --url https://github.com/YOUR-ORGANIZATION --token EXAMPLE-TOKEN --disableupdate
|
||||
```
|
||||
|
||||
If you disable automatic updates, you must still update your runner version regularly. New functionality in {% data variables.product.prodname_actions %} requires changes in both the {% data variables.product.prodname_actions %} service _and_ the runner software. The runner may not be able to correctly process jobs that take advantage of new features in {% data variables.product.prodname_actions %} without a software update.
|
||||
|
||||
@@ -77,7 +77,7 @@ You can manage the runner service in the Windows **Services** application, or yo
|
||||
1. Alternatively, the command takes an optional `user` argument to install the service as a different user.
|
||||
|
||||
```shell
|
||||
./svc.sh install <em>USERNAME</em>
|
||||
./svc.sh install USERNAME
|
||||
```
|
||||
|
||||
{% endlinux %}
|
||||
|
||||
@@ -59,7 +59,7 @@ For example:
|
||||
{% windows %}
|
||||
|
||||
```shell
|
||||
run.cmd --check --url <em>https://github.com/octo-org/octo-repo</em> --pat <em>ghp_abcd1234</em>
|
||||
run.cmd --check --url https://github.com/YOUR-ORG/YOUR-REPO --pat GHP_ABCD1234
|
||||
```
|
||||
|
||||
{% endwindows %}
|
||||
@@ -79,7 +79,7 @@ To disable TLS certification verification in the self-hosted runner application,
|
||||
|
||||
```shell
|
||||
export GITHUB_ACTIONS_RUNNER_TLS_NO_VERIFY=1
|
||||
./config.sh --url <em>https://github.com/octo-org/octo-repo</em> --token
|
||||
./config.sh --url https://github.com/YOUR-ORG/YOUR-REPO --token
|
||||
./run.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ The disabled workflow is marked {% octicon "stop" aria-label="The stop icon" %}
|
||||
To disable a workflow, use the `workflow disable` subcommand. Replace `workflow` with either the name, ID, or file name of the workflow you want to disable. For example, `"Link Checker"`, `1234567`, or `"link-check-test.yml"`. If you don't specify a workflow, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a workflow.
|
||||
|
||||
```shell
|
||||
gh workflow disable <em>workflow</em>
|
||||
gh workflow disable WORKFLOW
|
||||
```
|
||||
|
||||
{% endcli %}
|
||||
@@ -78,7 +78,7 @@ You can re-enable a workflow that was previously disabled.
|
||||
To enable a workflow, use the `workflow enable` subcommand. Replace `workflow` with either the name, ID, or file name of the workflow you want to enable. For example, `"Link Checker"`, `1234567`, or `"link-check-test.yml"`. If you don't specify a workflow, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a workflow.
|
||||
|
||||
```shell
|
||||
gh workflow enable <em>workflow</em>
|
||||
gh workflow enable WORKFLOW
|
||||
```
|
||||
|
||||
{% endcli %}
|
||||
|
||||
@@ -38,25 +38,25 @@ By default, {% data variables.product.product_name %} stores build logs and arti
|
||||
To download all artifacts generated by a workflow run, use the `run download` subcommand. Replace `run-id` with the ID of the run that you want to download artifacts from. If you don't specify a `run-id`, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a recent run.
|
||||
|
||||
```shell
|
||||
gh run download <em>run-id</em>
|
||||
gh run download RUN_ID
|
||||
```
|
||||
|
||||
To download a specific artifact from a run, use the `run download` subcommand. Replace `run-id` with the ID of the run that you want to download artifacts from. Replace `artifact-name` with the name of the artifact that you want to download.
|
||||
|
||||
```shell
|
||||
gh run download <em>run-id</em> -n <em>artifact-name</em>
|
||||
gh run download RUN_ID -n ARTIFACT_NAME
|
||||
```
|
||||
|
||||
You can specify more than one artifact.
|
||||
|
||||
```shell
|
||||
gh run download <em>run-id</em> -n <em>artifact-name-1</em> -n <em>artifact-name-2</em>
|
||||
gh run download RUN_ID> -n ARTIFACT_NAME-1 -n ARTIFACT_NAME-2
|
||||
```
|
||||
|
||||
To download specific artifacts across all runs in a repository, use the `run download` subcommand.
|
||||
|
||||
```shell
|
||||
gh run download -n <em>artifact-name-1</em> -n <em>artifact-name-2</em>
|
||||
gh run download -n ARTIFACT_NAME-1 ARTIFACT_NAME-2
|
||||
```
|
||||
|
||||
{% endcli %}
|
||||
|
||||
@@ -40,7 +40,7 @@ To run a workflow manually, the workflow must be configured to run on the `workf
|
||||
To run a workflow, use the `workflow run` subcommand. Replace the `workflow` parameter with either the name, ID, or file name of the workflow you want to run. For example, `"Link Checker"`, `1234567`, or `"link-check-test.yml"`. If you don't specify a workflow, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a workflow.
|
||||
|
||||
```shell
|
||||
gh workflow run <em>workflow</em>
|
||||
gh workflow run WORKFLOW
|
||||
```
|
||||
|
||||
If your workflow accepts inputs, {% data variables.product.prodname_cli %} will prompt you to enter them. Alternatively, you can use `-f` or `-F` to add an input in `key=value` format. Use `-F` to read from a file.
|
||||
@@ -58,7 +58,7 @@ echo '{"name":"mona", "greeting":"hello"}' | gh workflow run greet.yml --json
|
||||
To run a workflow on a branch other than the repository's default branch, use the `--ref` flag.
|
||||
|
||||
```shell
|
||||
gh workflow run <em>workflow</em> --ref <em>branch-name</em>
|
||||
gh workflow run WORKFLOW --ref BRANCH
|
||||
```
|
||||
|
||||
To view the progress of the workflow run, use the `run watch` subcommand and select the run from the interactive list.
|
||||
|
||||
@@ -48,14 +48,14 @@ Re-running a workflow{% ifversion re-run-jobs %} or jobs in a workflow{% endif %
|
||||
To re-run a failed workflow run, use the `run rerun` subcommand. Replace `run-id` with the ID of the failed run that you want to re-run. If you don't specify a `run-id`, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a recent failed run.
|
||||
|
||||
```shell
|
||||
gh run rerun <em>run-id</em>
|
||||
gh run rerun RUN_ID
|
||||
```
|
||||
|
||||
{% ifversion debug-reruns %}
|
||||
{% data reusables.actions.enable-debug-logging-cli %}
|
||||
|
||||
```shell
|
||||
gh run rerun <em>run-id</em> --debug
|
||||
gh run rerun RUN_ID --debug
|
||||
```
|
||||
|
||||
{% endif %}
|
||||
@@ -90,14 +90,14 @@ If any jobs in a workflow run failed, you can re-run just the jobs that failed.
|
||||
To re-run failed jobs in a workflow run, use the `run rerun` subcommand with the `--failed` flag. Replace `run-id` with the ID of the run for which you want to re-run failed jobs. If you don't specify a `run-id`, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a recent failed run.
|
||||
|
||||
```shell
|
||||
gh run rerun <em>run-id</em> --failed
|
||||
gh run rerun RUN_ID --failed
|
||||
```
|
||||
|
||||
{% ifversion debug-reruns %}
|
||||
{% data reusables.actions.enable-debug-logging-cli %}
|
||||
|
||||
```shell
|
||||
gh run rerun <em>run-id</em> --failed --debug
|
||||
gh run rerun RUN_ID --failed --debug
|
||||
```
|
||||
|
||||
{% endif %}
|
||||
@@ -127,14 +127,14 @@ When you re-run a specific job in a workflow, a new workflow run will start for
|
||||
To re-run a specific job in a workflow run, use the `run rerun` subcommand with the `--job` flag. Replace `job-id` with the ID of the job that you want to re-run.
|
||||
|
||||
```shell
|
||||
gh run rerun --job <em>job-id</em>
|
||||
gh run rerun --job JOB_ID
|
||||
```
|
||||
|
||||
{% ifversion debug-reruns %}
|
||||
{% data reusables.actions.enable-debug-logging-cli %}
|
||||
|
||||
```shell
|
||||
gh run rerun --job <em>job-id</em> --debug
|
||||
gh run rerun --job JOB_ID --debug
|
||||
```
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -98,23 +98,23 @@ After deleting logs, the **Delete all logs** button is removed to indicate that
|
||||
To view the log for a specific job, use the `run view` subcommand. Replace `run-id` with the ID of run that you want to view logs for. {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a job from the run. If you don't specify `run-id`, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a recent run, and then returns another interactive menu for you to choose a job from the run.
|
||||
|
||||
```shell
|
||||
gh run view <em>run-id</em> --log
|
||||
gh run view RUN_ID --log
|
||||
```
|
||||
|
||||
You can also use the `--job` flag to specify a job ID. Replace `job-id` with the ID of the job that you want to view logs for.
|
||||
|
||||
```shell
|
||||
gh run view --job <em>job-id</em> --log
|
||||
gh run view --job JOB_ID --log
|
||||
```
|
||||
|
||||
You can use `grep` to search the log. For example, this command will return all log entries that contain the word `error`.
|
||||
|
||||
```shell
|
||||
gh run view --job <em>job-id</em> --log | grep error
|
||||
gh run view --job JOB_ID --log | grep error
|
||||
```
|
||||
|
||||
To filter the logs for any failed steps, use `--log-failed` instead of `--log`.
|
||||
|
||||
```shell
|
||||
gh run view --job <em>job-id</em> --log-failed
|
||||
gh run view --job JOB_ID --log-failed
|
||||
```
|
||||
|
||||
@@ -46,7 +46,7 @@ gh run list --limit 5
|
||||
To only return runs for the specified workflow, you can use the `-w` or `--workflow` flag. Replace `workflow` with either the workflow name, workflow ID, or workflow file name. For example, `"Link Checker"`, `1234567`, or `"link-check-test.yml"`.
|
||||
|
||||
```shell
|
||||
gh run list --workflow <em>workflow</em>
|
||||
gh run list --workflow WORKFLOW
|
||||
```
|
||||
|
||||
### Viewing details for a specific workflow run
|
||||
@@ -54,25 +54,25 @@ gh run list --workflow <em>workflow</em>
|
||||
To display details for a specific workflow run, use the `run view` subcommand. Replace `run-id` with the ID of the run that you want to view. If you don't specify a `run-id`, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a recent run.
|
||||
|
||||
```shell
|
||||
gh run view <em>run-id</em>
|
||||
gh run view RUN_ID
|
||||
```
|
||||
|
||||
To include job steps in the output, use the `-v` or `--verbose` flag.
|
||||
|
||||
```shell
|
||||
gh run view <em>run-id</em> --verbose
|
||||
gh run view RUN_ID --verbose
|
||||
```
|
||||
|
||||
To view details for a specific job in the run, use the `-j` or `--job` flag. Replace `job-id` with the ID of the job that you want to view.
|
||||
|
||||
```shell
|
||||
gh run view --job <em>job-id</em>
|
||||
gh run view --job JOB_ID
|
||||
```
|
||||
|
||||
To view the full log for a job, use the `--log` flag.
|
||||
|
||||
```shell
|
||||
gh run view --job <em>job-id</em> --log
|
||||
gh run view --job JOB_ID --log
|
||||
```
|
||||
|
||||
Use the `--exit-status` flag to exit with a non-zero status if the run failed. For example:
|
||||
|
||||
@@ -93,13 +93,13 @@ If your repository has environment secrets or can access secrets from the parent
|
||||
To add a repository secret, use the `gh secret set` subcommand. Replace `secret-name` with the name of your secret.
|
||||
|
||||
```shell
|
||||
gh secret set <em>secret-name</em>
|
||||
gh secret set SECRET_NAME
|
||||
```
|
||||
|
||||
The CLI will prompt you to enter a secret value. Alternatively, you can read the value of the secret from a file.
|
||||
|
||||
```shell
|
||||
gh secret set <em>secret-name</em> < secret.txt
|
||||
gh secret set SECRET_NAME < secret.txt
|
||||
```
|
||||
|
||||
To list all secrets for the repository, use the `gh secret list` subcommand.
|
||||
@@ -128,13 +128,13 @@ To list all secrets for the repository, use the `gh secret list` subcommand.
|
||||
To add a secret for an environment, use the `gh secret set` subcommand with the `--env` or `-e` flag followed by the environment name.
|
||||
|
||||
```shell
|
||||
gh secret set --env <em>environment-name</em> <em>secret-name</em>
|
||||
gh secret set --env ENV_NAME SECRET_NAME
|
||||
```
|
||||
|
||||
To list all secrets for an environment, use the `gh secret list` subcommand with the `--env` or `-e` flag followed by the environment name.
|
||||
|
||||
```shell
|
||||
gh secret list --env <em>environment-name</em>
|
||||
gh secret list --env ENV_NAME
|
||||
```
|
||||
|
||||
{% endcli %}
|
||||
@@ -173,25 +173,25 @@ gh auth login --scopes "admin:org"
|
||||
To add a secret for an organization, use the `gh secret set` subcommand with the `--org` or `-o` flag followed by the organization name.
|
||||
|
||||
```shell
|
||||
gh secret set --org <em>organization-name</em> <em>secret-name</em>
|
||||
gh secret set --org ORG_NAME SECRET_NAME
|
||||
```
|
||||
|
||||
By default, the secret is only available to private repositories. To specify that the secret should be available to all repositories within the organization, use the `--visibility` or `-v` flag.
|
||||
|
||||
```shell
|
||||
gh secret set --org <em>organization-name</em> <em>secret-name</em> --visibility all
|
||||
gh secret set --org ORG_NAME SECRET_NAME --visibility all
|
||||
```
|
||||
|
||||
To specify that the secret should be available to selected repositories within the organization, use the `--repos` or `-r` flag.
|
||||
|
||||
```shell
|
||||
gh secret set --org <em>organization-name</em> <em>secret-name</em> --repos <em>repo-name-1</em>,<em>repo-name-2</em>"
|
||||
gh secret set --org ORG_NAME SECRET_NAME --repos REPO-NAME-1, REPO-NAME-2"
|
||||
```
|
||||
|
||||
To list all secrets for an organization, use the `gh secret list` subcommand with the `--org` or `-o` flag followed by the organization name.
|
||||
|
||||
```shell
|
||||
gh secret list --org <em>organization-name</em>
|
||||
gh secret list --org ORG_NAME
|
||||
```
|
||||
|
||||
{% endcli %}
|
||||
|
||||
@@ -58,13 +58,13 @@ If you encounter the `Permission denied (publickey)` error when you try to conne
|
||||
To specify a private SSH key using the command line, run `ssh` with the `-i` argument.
|
||||
|
||||
```shell
|
||||
ssh -i /path/to/ghe_private_key -p 122 admin@<em>hostname</em>
|
||||
ssh -i /path/to/ghe_private_key -p 122 admin@HOSTNAME
|
||||
```
|
||||
|
||||
You can also specify a private SSH key using the SSH configuration file (`~/.ssh/config`).
|
||||
|
||||
```shell
|
||||
Host <em>hostname</em>
|
||||
Host HOSTNAME
|
||||
IdentityFile /path/to/ghe_private_key
|
||||
User admin
|
||||
Port 122
|
||||
|
||||
@@ -69,11 +69,11 @@ With this command, you can also pause or resume jobs in the queue.
|
||||
```shell
|
||||
$ ghe-aqueduct status
|
||||
# lists queues and the number of currently queued jobs for all queues
|
||||
$ ghe-aqueduct queue_depth --queue <em>QUEUE</em>
|
||||
$ ghe-aqueduct queue_depth --queue QUEUE
|
||||
# lists the number of currently queued jobs for the specified queue
|
||||
$ ghe-aqueduct pause --queue <em>QUEUE</em>
|
||||
$ ghe-aqueduct pause --queue QUEUE
|
||||
# pauses the specified queue
|
||||
$ ghe-aqueduct resume --queue <em>QUEUE</em>
|
||||
$ ghe-aqueduct resume --queue QUEUE
|
||||
# resumes the specified queue
|
||||
```
|
||||
{% endif %}
|
||||
@@ -112,24 +112,24 @@ ghe-cleanup-settings
|
||||
With this utility, you can both retrieve and modify the configuration settings of {% data variables.product.product_location %}.
|
||||
|
||||
```shell
|
||||
$ ghe-config <em>core.github-hostname</em>
|
||||
$ ghe-config core.github-hostname
|
||||
# Gets the configuration value of `core.github-hostname`
|
||||
$ ghe-config <em>core.github-hostname</em> <em>'example.com'</em>
|
||||
# Sets the configuration value of `core.github-hostname` to `example.com`
|
||||
$ ghe-config core.github-hostname URL
|
||||
# Sets the configuration value of `core.github-hostname` to the specified URL
|
||||
$ ghe-config -l
|
||||
# Lists all the configuration values
|
||||
```
|
||||
Allows you to find the universally unique identifier (UUID) of your node in `cluster.conf`.
|
||||
|
||||
```shell
|
||||
$ ghe-config <em>HOSTNAME</em>.uuid
|
||||
$ ghe-config HOSTNAME.uuid
|
||||
```
|
||||
|
||||
{% ifversion ghes %}
|
||||
Allows you to exempt a list of users from REST API rate limits. A hard limit of 120,000 requests will still apply to these users. For more information, see "[Resources in the REST API](/rest/overview/resources-in-the-rest-api#rate-limiting)."
|
||||
|
||||
``` shell
|
||||
$ ghe-config app.github.rate-limiting-exempt-users "<em>hubot</em> <em>github-actions</em>"
|
||||
$ ghe-config app.github.rate-limiting-exempt-users "HUBOT GITHUB-ACTIONS"
|
||||
# Exempts the users hubot and github-actions from rate limits
|
||||
```
|
||||
{% endif %}
|
||||
@@ -240,7 +240,7 @@ ghe-motd
|
||||
This utility returns a repository's name and owner based on the repository ID.
|
||||
|
||||
```shell
|
||||
ghe-nwo <em>REPOSITORY_ID</em>
|
||||
ghe-nwo REPOSITORY_ID
|
||||
```
|
||||
|
||||
### ghe-org-admin-promote
|
||||
@@ -259,19 +259,19 @@ This utility cannot promote a non-site admin to be an owner of all organizations
|
||||
Give organization owner privileges in a specific organization to a specific site admin
|
||||
|
||||
```shell
|
||||
ghe-org-admin-promote -u <em>USERNAME</em> -o <em>ORGANIZATION</em>
|
||||
ghe-org-admin-promote -u USERNAME -o ORGANIZATION
|
||||
```
|
||||
|
||||
Give organization owner privileges in all organizations to a specific site admin
|
||||
|
||||
```shell
|
||||
ghe-org-admin-promote -u <em>USERNAME</em>
|
||||
ghe-org-admin-promote -u USERNAME
|
||||
```
|
||||
|
||||
Give organization owner privileges in a specific organization to all site admins
|
||||
|
||||
```shell
|
||||
ghe-org-admin-promote -o <em>ORGANIZATION</em>
|
||||
ghe-org-admin-promote -o ORGANIZATION
|
||||
```
|
||||
|
||||
Give organization owner privileges in all organizations to all site admins
|
||||
@@ -452,7 +452,7 @@ You can use these additional options with the utility:
|
||||
- The `-h` flag displays more usage information.
|
||||
|
||||
```shell
|
||||
ghe-ssl-ca-certificate-install -c <em>/path/to/certificate</em>
|
||||
ghe-ssl-ca-certificate-install -c CERTIFICATE_PATH
|
||||
```
|
||||
|
||||
### ghe-ssl-certificate-setup
|
||||
@@ -502,24 +502,24 @@ ghe-webhook-logs
|
||||
To show all failed hook deliveries in the past day:
|
||||
{% ifversion ghes %}
|
||||
```shell
|
||||
ghe-webhook-logs -f -a <em>YYYY-MM-DD</em>
|
||||
ghe-webhook-logs -f -a YYYY-MM-DD
|
||||
```
|
||||
|
||||
The date format should be `YYYY-MM-DD`, `YYYY-MM-DD HH:MM:SS`, or `YYYY-MM-DD HH:MM:SS (+/-) HH:M`.
|
||||
{% else %}
|
||||
```shell
|
||||
ghe-webhook-logs -f -a <em>YYYYMMDD</em>
|
||||
ghe-webhook-logs -f -a YYYYMMDD
|
||||
```
|
||||
{% endif %}
|
||||
|
||||
To show the full hook payload, result, and any exceptions for the delivery:
|
||||
{% ifversion ghes %}
|
||||
```shell
|
||||
ghe-webhook-logs -g <em>delivery-guid</em>
|
||||
ghe-webhook-logs -g DELIVERY_GUID
|
||||
```
|
||||
{% else %}
|
||||
```shell
|
||||
ghe-webhook-logs -g <em>delivery-guid</em> -v
|
||||
ghe-webhook-logs -g DELIVERY_GUID -v
|
||||
```
|
||||
{% endif %}
|
||||
|
||||
@@ -541,22 +541,22 @@ By default, the command creates the tarball in */tmp*, but you can also have it
|
||||
|
||||
To create a standard bundle:
|
||||
```shell
|
||||
$ ssh -p 122 admin@<em>hostname</em> -- 'ghe-cluster-support-bundle -o' > cluster-support-bundle.tgz
|
||||
$ ssh -p 122 admin@HOSTNAME -- 'ghe-cluster-support-bundle -o' > cluster-support-bundle.tgz
|
||||
```
|
||||
|
||||
To create an extended bundle:
|
||||
```shell
|
||||
$ ssh -p 122 admin@<em>hostname</em> -- 'ghe-cluster-support-bundle -x -o' > cluster-support-bundle.tgz
|
||||
$ ssh -p 122 admin@HOSTNAME -- 'ghe-cluster-support-bundle -x -o' > cluster-support-bundle.tgz
|
||||
```
|
||||
|
||||
To send a bundle to {% data variables.contact.github_support %}:
|
||||
```shell
|
||||
$ ssh -p 122 admin@<em>hostname</em> -- 'ghe-cluster-support-bundle -u'
|
||||
$ ssh -p 122 admin@HOSTNAME -- 'ghe-cluster-support-bundle -u'
|
||||
```
|
||||
|
||||
To send a bundle to {% data variables.contact.github_support %} and associate the bundle with a ticket:
|
||||
```shell
|
||||
$ ssh -p 122 admin@<em>hostname</em> -- 'ghe-cluster-support-bundle -t <em>ticket-id</em>'
|
||||
$ ssh -p 122 admin@HOSTNAME -- 'ghe-cluster-support-bundle -t TICKET_ID'
|
||||
```
|
||||
|
||||
{% ifversion ghes %}
|
||||
@@ -584,7 +584,7 @@ ghe-dpages status
|
||||
|
||||
To evacuate a {% data variables.product.prodname_pages %} storage service before evacuating a cluster node:
|
||||
```shell
|
||||
ghe-dpages evacuate pages-server-<em>UUID</em>
|
||||
ghe-dpages evacuate pages-server-UUID
|
||||
```
|
||||
|
||||
### ghe-spokes
|
||||
@@ -610,7 +610,7 @@ ghe-spokes route
|
||||
To evacuate storage services on a cluster node:
|
||||
|
||||
```shell
|
||||
ghe-spokes server evacuate git-server-<em>UUID</em>
|
||||
ghe-spokes server evacuate git-server-UUID
|
||||
```
|
||||
|
||||
### ghe-storage
|
||||
@@ -618,7 +618,7 @@ ghe-spokes server evacuate git-server-<em>UUID</em>
|
||||
This utility allows you to evacuate all storage services before evacuating a cluster node.
|
||||
|
||||
```shell
|
||||
ghe-storage evacuate storage-server-<em>UUID</em>
|
||||
ghe-storage evacuate storage-server-UUID
|
||||
```
|
||||
|
||||
## Git
|
||||
@@ -661,7 +661,7 @@ Try ghe-governor <subcommand> --help for more information on the arguments each
|
||||
This utility allows you to change to a repository's directory and open an interactive shell as the `git` user. You can perform manual inspection or maintenance of a repository via commands like `git-*` or `git-nw-*`.
|
||||
|
||||
```shell
|
||||
ghe-repo <em>username</em>/<em>reponame</em>
|
||||
ghe-repo USERNAME/REPONAME
|
||||
```
|
||||
|
||||
### ghe-repo-gc
|
||||
@@ -677,7 +677,7 @@ You can add the optional `--prune` argument to remove unreachable Git objects th
|
||||
{% endwarning %}
|
||||
|
||||
```shell
|
||||
ghe-repo-gc <em>username</em>/<em>reponame</em>
|
||||
ghe-repo-gc USERNAME/REPONAME
|
||||
```
|
||||
|
||||
## {% data variables.product.prodname_actions %}
|
||||
@@ -697,7 +697,7 @@ This utility tests the blob storage configuration for {% data variables.product.
|
||||
For more information about the configuration of {% data variables.product.prodname_actions %}, see "[Getting started with {% data variables.product.prodname_actions %} for {% data variables.product.product_name %}](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server)."
|
||||
|
||||
```shell
|
||||
ghe-actions-precheck -p [<em>provider</em>] -cs ["<em>connectionstring</em>"]
|
||||
ghe-actions-precheck -p [PROVIDER] -cs ["CONNECTION-STRING"]
|
||||
```
|
||||
|
||||
If your storage system is configured correctly, you'll see the following output.
|
||||
@@ -784,23 +784,23 @@ By default, the command creates the tarball in */tmp*, but you can also have it
|
||||
|
||||
To create a standard bundle:
|
||||
```shell
|
||||
$ ssh -p 122 admin@<em>hostname</em> -- 'ghe-support-bundle -o' > support-bundle.tgz
|
||||
$ ssh -p 122 admin@HOSTNAME -- 'ghe-support-bundle -o' > support-bundle.tgz
|
||||
```
|
||||
|
||||
To create an extended bundle:
|
||||
```shell
|
||||
$ ssh -p 122 admin@<em>hostname</em> -- 'ghe-support-bundle -x -o' > support-bundle.tgz
|
||||
$ ssh -p 122 admin@HOSTNAME -- 'ghe-support-bundle -x -o' > support-bundle.tgz
|
||||
```
|
||||
|
||||
To send a bundle to {% data variables.contact.github_support %}:
|
||||
```shell
|
||||
$ ssh -p 122 admin@<em>hostname</em> -- 'ghe-support-bundle -u'
|
||||
$ ssh -p 122 admin@HOSTNAME -- 'ghe-support-bundle -u'
|
||||
```
|
||||
|
||||
To send a bundle to {% data variables.contact.github_support %} and associate the bundle with a ticket:
|
||||
|
||||
```shell
|
||||
$ ssh -p 122 admin@<em>hostname</em> -- 'ghe-support-bundle -t <em>ticket-id</em>'
|
||||
$ ssh -p 122 admin@HOSTNAME -- 'ghe-support-bundle -t TICKET_ID'
|
||||
```
|
||||
|
||||
### ghe-support-upload
|
||||
@@ -809,12 +809,12 @@ This utility sends information from your appliance to {% data variables.product.
|
||||
|
||||
To send a file to {% data variables.contact.github_support %} and associate the file with a ticket:
|
||||
```shell
|
||||
ghe-support-upload -f <em>path/to/your/file</em> -t <em>ticket-id</em>
|
||||
ghe-support-upload -f FILE_PATH -t TICKET_ID
|
||||
```
|
||||
|
||||
To upload data via `STDIN` and associating the data with a ticket:
|
||||
```shell
|
||||
<em>ghe-repl-status -vv</em> | ghe-support-upload -t <em>ticket-id</em> -d "<em>Verbose Replication Status</em>"
|
||||
ghe-repl-status -vv | ghe-support-upload -t TICKET_ID -d "Verbose Replication Status"
|
||||
```
|
||||
|
||||
In this example, `ghe-repl-status -vv` sends verbose status information from a replica appliance. You should replace `ghe-repl-status -vv` with the specific data you'd like to stream to `STDIN`, and `Verbose Replication Status` with a brief description of the data. {% data reusables.enterprise_enterprise_support.support_will_ask_you_to_run_command %}
|
||||
@@ -827,12 +827,12 @@ This utility installs or verifies an upgrade package. You can also use this util
|
||||
|
||||
To verify an upgrade package:
|
||||
```shell
|
||||
ghe-upgrade --verify <em>UPGRADE-PACKAGE-FILENAME</em>
|
||||
ghe-upgrade --verify UPGRADE-PACKAGE-FILENAME
|
||||
```
|
||||
|
||||
To install an upgrade package:
|
||||
```shell
|
||||
ghe-upgrade <em>UPGRADE-PACKAGE-FILENAME</em>
|
||||
ghe-upgrade UPGRADE-PACKAGE-FILENAME
|
||||
```
|
||||
|
||||
{% data reusables.enterprise_installation.command-line-utilities-ghe-upgrade-rollback %}
|
||||
@@ -843,18 +843,18 @@ This utility manages scheduled installation of upgrade packages. You can show, c
|
||||
|
||||
To schedule a new installation for a package:
|
||||
```shell
|
||||
$ ghe-upgrade-scheduler -c "0 2 15 12 *" <em>UPGRADE-PACKAGE-FILENAME</em>
|
||||
$ ghe-upgrade-scheduler -c "0 2 15 12 *" UPGRADE-PACKAGE-FILENAME
|
||||
```
|
||||
|
||||
To show scheduled installations for a package:
|
||||
```shell
|
||||
$ ghe-upgrade-scheduler -s <em>UPGRADE PACKAGE FILENAME</em>
|
||||
> 0 2 15 12 * /usr/local/bin/ghe-upgrade -y -s <em>UPGRADE-PACKAGE-FILENAME</em> > /data/user/common/<em>UPGRADE-PACKAGE-FILENAME</em>.log 2>&1
|
||||
$ ghe-upgrade-scheduler -s UPGRADE PACKAGE FILENAME
|
||||
> 0 2 15 12 * /usr/local/bin/ghe-upgrade -y -s UPGRADE-PACKAGE-FILENAME > /data/user/common/UPGRADE-PACKAGE-FILENAME.log 2>&1
|
||||
```
|
||||
|
||||
To remove scheduled installations for a package:
|
||||
```shell
|
||||
$ ghe-upgrade-scheduler -r <em>UPGRADE PACKAGE FILENAME</em>
|
||||
$ ghe-upgrade-scheduler -r UPGRADE PACKAGE FILENAME
|
||||
```
|
||||
|
||||
### ghe-update-check
|
||||
@@ -866,7 +866,7 @@ A file containing the status of the download is available at */var/lib/ghe-updat
|
||||
To check for the latest {% data variables.product.prodname_enterprise %} release, use the `-i` switch.
|
||||
|
||||
```shell
|
||||
$ ssh -p 122 admin@<em>hostname</em> -- 'ghe-update-check'
|
||||
$ ssh -p 122 admin@HOSTNAME -- 'ghe-update-check'
|
||||
```
|
||||
|
||||
## User management
|
||||
@@ -886,7 +886,7 @@ ghe-license-usage
|
||||
This utility will enforce the default organization membership visibility setting on all members in your instance. For more information, see "[Configuring visibility for organization membership](/enterprise/admin/guides/user-management/configuring-visibility-for-organization-membership)." Setting options are `public` or `private`.
|
||||
|
||||
```shell
|
||||
ghe-org-membership-update --visibility=<em>SETTING</em>
|
||||
ghe-org-membership-update --visibility=SETTING
|
||||
```
|
||||
|
||||
### `ghe-user-csv`
|
||||
@@ -902,7 +902,7 @@ ghe-user-csv -o > users.csv
|
||||
This utility demotes the specified user from admin status to that of a regular user. We recommend using the web UI to perform this action, but provide this utility in case the `ghe-user-promote` utility is run in error and you need to demote a user again from the CLI.
|
||||
|
||||
```shell
|
||||
ghe-user-demote <em>some-user-name</em>
|
||||
ghe-user-demote USERNAME
|
||||
```
|
||||
|
||||
### ghe-user-promote
|
||||
@@ -910,7 +910,7 @@ ghe-user-demote <em>some-user-name</em>
|
||||
This utility promotes the specified user account to a site administrator.
|
||||
|
||||
```shell
|
||||
ghe-user-promote <em>some-user-name</em>
|
||||
ghe-user-promote USERNAME
|
||||
```
|
||||
|
||||
### ghe-user-suspend
|
||||
@@ -918,7 +918,7 @@ ghe-user-promote <em>some-user-name</em>
|
||||
This utility suspends the specified user, preventing them from logging in, pushing, or pulling from your repositories.
|
||||
|
||||
```shell
|
||||
ghe-user-suspend <em>some-user-name</em>
|
||||
ghe-user-suspend USERNAME
|
||||
```
|
||||
|
||||
### ghe-user-unsuspend
|
||||
@@ -926,5 +926,5 @@ ghe-user-suspend <em>some-user-name</em>
|
||||
This utility unsuspends the specified user, granting them access to login, push, and pull from your repositories.
|
||||
|
||||
```shell
|
||||
ghe-user-unsuspend <em>some-user-name</em>
|
||||
ghe-user-unsuspend USERNAME
|
||||
```
|
||||
|
||||
@@ -93,7 +93,7 @@ By default, the rate limit for {% data variables.product.prodname_actions %} is
|
||||
|
||||
```shell
|
||||
ghe-config actions-rate-limiting.enabled true
|
||||
ghe-config actions-rate-limiting.queue-runs-per-minute <em>RUNS-PER-MINUTE</em>
|
||||
ghe-config actions-rate-limiting.queue-runs-per-minute RUNS-PER-MINUTE
|
||||
```
|
||||
1. To disable the rate limit after it's been enabled, run the following command.
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ For more information, see [{% data variables.product.prodname_blog %}](https://g
|
||||
1. To configure a cutoff date after which {% data variables.product.product_location %} will deny connections from clients that use an RSA key uploaded after the date if the connection is signed by the SHA-1 hash function, enter the following command. Replace _**RFC-3399-UTC-TIMESTAMP**_ with a valid RFC 3399 UTC timestamp. For example, the default value, August 1, 2022, would be represented as `2022-08-01T00:00:00Z`. For more information, see [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) on the IETF website.
|
||||
|
||||
<pre>
|
||||
$ ghe-config app.gitauth.rsa-sha1 <em>RFC-3339-UTC-TIMESTAMP</em>
|
||||
$ ghe-config app.gitauth.rsa-sha1 RFC-3339-UTC-TIMESTAMP
|
||||
</pre>
|
||||
1. Alternatively, to completely disable SSH connections using RSA keys that are signed with the SHA-1 hash function, enter the following command.
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ You can also access these reports programmatically via standard HTTP authenticat
|
||||
For example, here is how you would download the "all users" report using cURL:
|
||||
|
||||
```shell
|
||||
curl -L -u <em>username</em>:<em>token</em> http(s)://<em>hostname</em>/stafftools/reports/all_users.csv
|
||||
curl -L -u USERNAME:TOKEN http(s)://HOSTNAME/stafftools/reports/all_users.csv
|
||||
```
|
||||
|
||||
To access the other reports programmatically, replace `all_users` with `active_users`, `dormant_users`, `suspended_users`, `all_organizations`, or `all_repositories`.
|
||||
|
||||
@@ -64,7 +64,7 @@ To verify your enterprise account's domain, you must have access to modify domai
|
||||
{% data reusables.organizations.add-dns-txt-record %}
|
||||
1. Wait for your DNS configuration to change, which may take up to 72 hours. You can confirm your DNS configuration has changed by running the `dig` command on the command line, replacing `ENTERPRISE-ACCOUNT` with the name of your enterprise account, and `example.com` with the domain you'd like to verify. You should see your new TXT record listed in the command output.
|
||||
```shell
|
||||
dig _github-challenge-<em>ENTERPRISE-ACCOUNT</em>.<em>example.com</em> +nostats +nocomments +nocmd TXT
|
||||
dig _github-challenge-ENTERPRISE-ACCOUNT.DOMAIN-NAME +nostats +nocomments +nocmd TXT
|
||||
```
|
||||
1. After confirming your TXT record is added to your DNS, follow steps one through four above to navigate to your enterprise account's approved and verified domains.
|
||||
{% data reusables.enterprise-accounts.continue-verifying-domain %}
|
||||
|
||||
@@ -45,7 +45,7 @@ Then, when told to fetch `https://github.example.com/myorg/myrepo`, Git will ins
|
||||
1. Connect to the repository cache's IP address using SSH.
|
||||
|
||||
```shell
|
||||
$ ssh -p 122 admin@<em>REPLICA IP</em>
|
||||
$ ssh -p 122 admin@REPLICA-IP
|
||||
```
|
||||
{%- ifversion ghes = 3.3 %}
|
||||
1. On your cache replica, enable the feature flag for repository caching.
|
||||
@@ -59,13 +59,13 @@ Then, when told to fetch `https://github.example.com/myorg/myrepo`, Git will ins
|
||||
1. To verify the connection to the primary and enable replica mode for the repository cache, run `ghe-repl-setup` again.
|
||||
|
||||
```shell
|
||||
$ ghe-repl-setup <em>PRIMARY IP</em>
|
||||
$ ghe-repl-setup PRIMARY-IP
|
||||
```
|
||||
|
||||
1. Set a `cache_location` for the repository cache, replacing *CACHE-LOCATION* with an alphanumeric identifier, such as the region where the cache is deployed. Also set a datacenter name for this cache; new caches will attempt to seed from another cache in the same datacenter.
|
||||
|
||||
```shell
|
||||
$ ghe-repl-node --cache <em>CACHE-LOCATION</em> --datacenter <em>REPLICA-DC-NAME</em>
|
||||
$ ghe-repl-node --cache CACHE-LOCATION --datacenter REPLICA-DC-NAME
|
||||
```
|
||||
|
||||
{% data reusables.enterprise_installation.replication-command %}
|
||||
|
||||
@@ -61,8 +61,8 @@ Before you define a secondary datacenter for your passive nodes, ensure that you
|
||||
|
||||
```shell
|
||||
[cluster]
|
||||
mysql-master = <em>HOSTNAME</em>
|
||||
redis-master = <em>HOSTNAME</em>
|
||||
mysql-master = HOSTNAME
|
||||
redis-master = HOSTNAME
|
||||
<strong>primary-datacenter = default</strong>
|
||||
```
|
||||
|
||||
@@ -77,10 +77,10 @@ Before you define a secondary datacenter for your passive nodes, ensure that you
|
||||
When you're done, the section for each node in the cluster configuration file should look like the following example. {% data reusables.enterprise_clustering.key-value-pair-order-irrelevant %}
|
||||
|
||||
```shell
|
||||
[cluster "<em>HOSTNAME</em>"]
|
||||
[cluster "HOSTNAME"]
|
||||
<strong>datacenter = default</strong>
|
||||
hostname = <em>HOSTNAME</em>
|
||||
ipv4 = <em>IP ADDRESS</em>
|
||||
hostname = HOSTNAME
|
||||
ipv4 = IP-ADDRESS
|
||||
...
|
||||
...
|
||||
```
|
||||
@@ -143,7 +143,7 @@ For an example configuration, see "[Example configuration](#example-configuratio
|
||||
6. Decide on a name for the secondary datacenter where you provisioned your passive nodes, then update the temporary cluster configuration file with the new datacenter name. Replace `SECONDARY` with the name you choose.
|
||||
|
||||
```shell
|
||||
sed -i 's/datacenter = default/datacenter = <em>SECONDARY</em>/g' ~/cluster-passive.conf
|
||||
sed -i 's/datacenter = default/datacenter = SECONDARY/g' ~/cluster-passive.conf
|
||||
```
|
||||
|
||||
7. Decide on a pattern for the passive nodes' hostnames.
|
||||
@@ -167,10 +167,10 @@ For an example configuration, see "[Example configuration](#example-configuratio
|
||||
- Add a new key-value pair, `replica = enabled`.
|
||||
|
||||
```shell
|
||||
[cluster "<em>NEW PASSIVE NODE HOSTNAME</em>"]
|
||||
[cluster "NEW PASSIVE NODE HOSTNAME"]
|
||||
...
|
||||
hostname = <em>NEW PASSIVE NODE HOSTNAME</em>
|
||||
ipv4 = <em>NEW PASSIVE NODE IPV4 ADDRESS</em>
|
||||
hostname = NEW PASSIVE NODE HOSTNAME
|
||||
ipv4 = NEW PASSIVE NODE IPV4 ADDRESS
|
||||
<strong>replica = enabled</strong>
|
||||
...
|
||||
...
|
||||
@@ -185,8 +185,8 @@ For an example configuration, see "[Example configuration](#example-configuratio
|
||||
11. Designate the primary MySQL and Redis nodes in the secondary datacenter. Replace `REPLICA MYSQL PRIMARY HOSTNAME` and `REPLICA REDIS PRIMARY HOSTNAME` with the hostnames of the passives node that you provisioned to match your existing MySQL and Redis primaries.
|
||||
|
||||
```shell
|
||||
git config -f /data/user/common/cluster.conf cluster.mysql-master-replica <em>REPLICA MYSQL PRIMARY HOSTNAME</em>
|
||||
git config -f /data/user/common/cluster.conf cluster.redis-master-replica <em>REPLICA REDIS PRIMARY HOSTNAME</em>
|
||||
git config -f /data/user/common/cluster.conf cluster.mysql-master-replica REPLICA-MYSQL-PRIMARY-HOSTNAME
|
||||
git config -f /data/user/common/cluster.conf cluster.redis-master-replica REPLICA-REDIS-PRIMARY-HOSTNAME
|
||||
```
|
||||
|
||||
{% warning %}
|
||||
@@ -194,7 +194,7 @@ For an example configuration, see "[Example configuration](#example-configuratio
|
||||
**Warning**: Review your cluster configuration file before proceeding.
|
||||
|
||||
- In the top-level `[cluster]` section, ensure that the values for `mysql-master-replica` and `redis-master-replica` are the correct hostnames for the passive nodes in the secondary datacenter that will serve as the MySQL and Redis primaries after a failover.
|
||||
- In each section for an active node named <code>[cluster "<em>ACTIVE NODE HOSTNAME</em>"]</code>, double-check the following key-value pairs.
|
||||
- In each section for an active node named <code>[cluster "ACTIVE NODE HOSTNAME"]</code>, double-check the following key-value pairs.
|
||||
- `datacenter` should match the value of `primary-datacenter` in the top-level `[cluster]` section.
|
||||
- `consul-datacenter` should match the value of `datacenter`, which should be the same as the value for `primary-datacenter` in the top-level `[cluster]` section.
|
||||
- Ensure that for each active node, the configuration has **one** corresponding section for **one** passive node with the same roles. In each section for a passive node, double-check each key-value pair.
|
||||
@@ -235,11 +235,11 @@ The top-level `[cluster]` configuration should look like the following example.
|
||||
|
||||
```shell
|
||||
[cluster]
|
||||
mysql-master = <em>HOSTNAME OF ACTIVE MYSQL MASTER</em>
|
||||
redis-master = <em>HOSTNAME OF ACTIVE REDIS MASTER</em>
|
||||
primary-datacenter = <em>PRIMARY DATACENTER NAME</em>
|
||||
mysql-master-replica = <em>HOSTNAME OF PASSIVE MYSQL MASTER</em>
|
||||
redis-master-replica = <em>HOSTNAME OF PASSIVE REDIS MASTER</em>
|
||||
mysql-master = HOSTNAME-OF-ACTIVE-MYSQL-MASTER
|
||||
redis-master = HOSTNAME-OF-ACTIVE-REDIS-MASTER
|
||||
primary-datacenter = PRIMARY-DATACENTER-NAME
|
||||
mysql-master-replica = HOSTNAME-OF-PASSIVE-MYSQL-MASTER
|
||||
redis-master-replica = HOSTNAME-OF-PASSIVE-REDIS-MASTER
|
||||
mysql-auto-failover = false
|
||||
...
|
||||
```
|
||||
@@ -248,10 +248,10 @@ The configuration for an active node in your cluster's storage tier should look
|
||||
|
||||
```shell
|
||||
...
|
||||
[cluster "<em>UNIQUE ACTIVE NODE HOSTNAME</em>"]
|
||||
[cluster "UNIQUE ACTIVE NODE HOSTNAME"]
|
||||
datacenter = default
|
||||
hostname = <em>UNIQUE ACTIVE NODE HOSTNAME</em>
|
||||
ipv4 = <em>IPV4 ADDRESS</em>
|
||||
hostname = UNIQUE-ACTIVE-NODE-HOSTNAME
|
||||
ipv4 = IPV4-ADDRESS
|
||||
consul-datacenter = default
|
||||
consul-server = true
|
||||
git-server = true
|
||||
@@ -262,9 +262,9 @@ The configuration for an active node in your cluster's storage tier should look
|
||||
memcache-server = true
|
||||
metrics-server = true
|
||||
storage-server = true
|
||||
vpn = <em>IPV4 ADDRESS SET AUTOMATICALLY</em>
|
||||
uuid = <em>UUID SET AUTOMATICALLY</em>
|
||||
wireguard-pubkey = <em>PUBLIC KEY SET AUTOMATICALLY</em>
|
||||
vpn = IPV4 ADDRESS SET AUTOMATICALLY
|
||||
uuid = UUID SET AUTOMATICALLY
|
||||
wireguard-pubkey = PUBLIC KEY SET AUTOMATICALLY
|
||||
...
|
||||
```
|
||||
|
||||
@@ -276,12 +276,12 @@ The configuration for the corresponding passive node in the storage tier should
|
||||
|
||||
```shell
|
||||
...
|
||||
<strong>[cluster "<em>UNIQUE PASSIVE NODE HOSTNAME</em>"]</strong>
|
||||
<strong>[cluster "UNIQUE PASSIVE NODE HOSTNAME"]</strong>
|
||||
<strong>replica = enabled</strong>
|
||||
<strong>ipv4 = <em>IPV4 ADDRESS OF NEW VM WITH IDENTICAL RESOURCES</em></strong>
|
||||
<strong>datacenter = <em>SECONDARY DATACENTER NAME</em></strong>
|
||||
<strong>hostname = <em>UNIQUE PASSIVE NODE HOSTNAME</em></strong>
|
||||
<strong>consul-datacenter = <em>SECONDARY DATACENTER NAME</em></strong>
|
||||
<strong>ipv4 = IPV4 ADDRESS OF NEW VM WITH IDENTICAL RESOURCES</strong>
|
||||
<strong>datacenter = SECONDARY DATACENTER NAME</strong>
|
||||
<strong>hostname = UNIQUE PASSIVE NODE HOSTNAME</strong>
|
||||
<strong>consul-datacenter = SECONDARY DATACENTER NAME</strong>
|
||||
consul-server = true
|
||||
git-server = true
|
||||
pages-server = true
|
||||
@@ -291,9 +291,9 @@ The configuration for the corresponding passive node in the storage tier should
|
||||
memcache-server = true
|
||||
metrics-server = true
|
||||
storage-server = true
|
||||
<strong>vpn = <em>DO NOT DEFINE</em></strong>
|
||||
<strong>uuid = <em>DO NOT DEFINE</em></strong>
|
||||
<strong>wireguard-pubkey = <em>DO NOT DEFINE</em></strong>
|
||||
<strong>vpn = DO NOT DEFINE</strong>
|
||||
<strong>uuid = DO NOT DEFINE</strong>
|
||||
<strong>wireguard-pubkey = DO NOT DEFINE</strong>
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
@@ -37,49 +37,49 @@ If you plan to take a node offline and the node runs a data service role like `g
|
||||
1. To find the UUID of the node to evacuate, run the following command. Replace `HOSTNAME` with the node's hostname.
|
||||
|
||||
```shell
|
||||
$ ghe-config cluster.<em>HOSTNAME</em>.uuid
|
||||
$ ghe-config cluster.HOSTNAME.uuid
|
||||
```
|
||||
1. Monitor the node's status while {% data variables.product.product_name %} copies the data. Don't take the node offline until the copy is complete. To monitor the status of your node, run any of the following commands, replacing `UUID` with the UUID from step 2.
|
||||
|
||||
- **Git**:
|
||||
|
||||
```shell
|
||||
$ ghe-spokes evac-status git-server-<em>UUID</em>
|
||||
$ ghe-spokes evac-status git-server-UUID
|
||||
```
|
||||
|
||||
- **{% data variables.product.prodname_pages %}**:
|
||||
|
||||
```shell
|
||||
$ echo "select count(*) from pages_replicas where host = 'pages-server-<em>UUID</em>'" | ghe-dbconsole -y
|
||||
$ echo "select count(*) from pages_replicas where host = 'pages-server-UUID'" | ghe-dbconsole -y
|
||||
```
|
||||
|
||||
- **Storage**:
|
||||
|
||||
```shell
|
||||
$ ghe-storage evacuation-status storage-server-<em>UUID</em>
|
||||
$ ghe-storage evacuation-status storage-server-UUID
|
||||
```
|
||||
1. After the copy is complete, you can evacuate the node by running any of the following commands, replacing `UUID` with the UUID from step 2.
|
||||
|
||||
- **Git**:
|
||||
|
||||
```shell
|
||||
$ ghe-spokes server evacuate git-server-<em>UUID</em> \'<em>REASON FOR EVACUATION</em>\'
|
||||
$ ghe-spokes server evacuate git-server-UUID \'REASON FOR EVACUATION\'
|
||||
```
|
||||
|
||||
- **{% data variables.product.prodname_pages %}**:
|
||||
|
||||
```shell
|
||||
$ ghe-dpages evacuate pages-server-<em>UUID</em>
|
||||
$ ghe-dpages evacuate pages-server-UUID
|
||||
```
|
||||
|
||||
- For **storage**, first take the node offline by running the following command.
|
||||
|
||||
```shell
|
||||
$ ghe-storage offline storage-server-<em>UUID</em>
|
||||
$ ghe-storage offline storage-server-UUID
|
||||
```
|
||||
|
||||
After the storage node is offline, you can evacuate the node by running the following command.
|
||||
|
||||
```shell
|
||||
$ ghe-storage evacuate storage-server-<em>UUID</em>
|
||||
$ ghe-storage evacuate storage-server-UUID
|
||||
```
|
||||
|
||||
@@ -21,7 +21,7 @@ topics:
|
||||
{% data variables.product.prodname_ghe_server %} has a built-in command line utility for monitoring the health of the cluster. From the administrative shell, running the `ghe-cluster-status` command executes a series of health checks on each node including verification of connectivity and service status. The output shows all test results including the text `ok` or `error`. For example, to only display failing tests, run:
|
||||
|
||||
```shell
|
||||
admin@ghe-data-node-0:~$ <em>ghe-cluster-status | grep error</em>
|
||||
admin@ghe-data-node-0:~$ ghe-cluster-status | grep error
|
||||
> mysql-replication ghe-data-node-0: error Stopped
|
||||
> mysql cluster: error
|
||||
```
|
||||
@@ -42,11 +42,11 @@ You can configure [Nagios](https://www.nagios.org/) to monitor {% data variables
|
||||
### Configuring the Nagios host
|
||||
1. Generate an SSH key with a blank passphrase. Nagios uses this to authenticate to the {% data variables.product.prodname_ghe_server %} cluster.
|
||||
```shell
|
||||
nagiosuser@nagios:~$ <em>ssh-keygen -t ed25519</em>
|
||||
nagiosuser@nagios:~$ ssh-keygen -t ed25519
|
||||
> Generating public/private ed25519 key pair.
|
||||
> Enter file in which to save the key (/home/nagiosuser/.ssh/id_ed25519):
|
||||
> Enter passphrase (empty for no passphrase): <em>leave blank by pressing enter</em>
|
||||
> Enter same passphrase again: <em>press enter again</em>
|
||||
> Enter passphrase (empty for no passphrase): LEAVE BLANK BY PRESSING ENTER
|
||||
> Enter same passphrase again: PRESS ENTER AGAIN
|
||||
> Your identification has been saved in /home/nagiosuser/.ssh/id_ed25519.
|
||||
> Your public key has been saved in /home/nagiosuser/.ssh/id_ed25519.pub.
|
||||
```
|
||||
@@ -65,8 +65,8 @@ You can configure [Nagios](https://www.nagios.org/) to monitor {% data variables
|
||||
{% endnote %}
|
||||
2. Copy the private key (`id_ed25519`) to the `nagios` home folder and set the appropriate ownership.
|
||||
```shell
|
||||
nagiosuser@nagios:~$ <em>sudo cp .ssh/id_ed25519 /var/lib/nagios/.ssh/</em>
|
||||
nagiosuser@nagios:~$ <em>sudo chown nagios:nagios /var/lib/nagios/.ssh/id_ed25519</em>
|
||||
nagiosuser@nagios:~$ sudo cp .ssh/id_ed25519 /var/lib/nagios/.ssh/
|
||||
nagiosuser@nagios:~$ sudo chown nagios:nagios /var/lib/nagios/.ssh/id_ed25519
|
||||
```
|
||||
|
||||
3. To authorize the public key to run *only* the `ghe-cluster-status -n` command, use a `command=` prefix in the `/data/user/common/authorized_keys` file. From the administrative shell on any node, modify this file to add the public key generated in step 1. For example: `command="/usr/local/bin/ghe-cluster-status -n" ssh-ed25519 AAAA....`
|
||||
@@ -74,7 +74,7 @@ You can configure [Nagios](https://www.nagios.org/) to monitor {% data variables
|
||||
4. Validate and copy the configuration to each node in the cluster by running `ghe-cluster-config-apply` on the node where you modified the `/data/user/common/authorized_keys` file.
|
||||
|
||||
```shell
|
||||
admin@ghe-data-node-0:~$ <em>ghe-cluster-config-apply</em>
|
||||
admin@ghe-data-node-0:~$ ghe-cluster-config-apply
|
||||
> Validating configuration
|
||||
> ...
|
||||
> Finished cluster configuration
|
||||
@@ -82,7 +82,7 @@ You can configure [Nagios](https://www.nagios.org/) to monitor {% data variables
|
||||
|
||||
5. To test that the Nagios plugin can successfully execute the command, run it interactively from Nagios host.
|
||||
```shell
|
||||
nagiosuser@nagios:~$ /usr/lib/nagios/plugins/check_by_ssh -l admin -p 122 -H <em>hostname</em> -C "ghe-cluster-status -n" -t 30
|
||||
nagiosuser@nagios:~$ /usr/lib/nagios/plugins/check_by_ssh -l admin -p 122 -H HOSTNAME -C "ghe-cluster-status -n" -t 30
|
||||
> OK - No errors detected
|
||||
```
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ topics:
|
||||
1. Back up your data with [{% data variables.product.prodname_enterprise_backup_utilities %}](https://github.com/github/backup-utils#readme).
|
||||
2. From the administrative shell of any node, use the `ghe-cluster-hotpatch` command to install the latest hotpatch. You can provide a URL for a hotpatch, or manually download the hotpatch and specify a local filename.
|
||||
```shell
|
||||
$ ghe-cluster-hotpatch https://<em>HOTPATCH-URL/FILENAME</em>.hpkg
|
||||
$ ghe-cluster-hotpatch https://HOTPATCH-URL/FILENAME.hpkg
|
||||
```
|
||||
|
||||
## Upgrading with an upgrade package
|
||||
@@ -33,7 +33,7 @@ Use an upgrade package to upgrade a {% data variables.product.prodname_ghe_serve
|
||||
4. On the [{% data variables.product.prodname_ghe_server %} Download Page](https://enterprise.github.com/download), copy the URL for the upgrade *.pkg* file to the clipboard.
|
||||
5. From the administrative shell of any node, use the `ghe-cluster-each` command combined with `curl` to download the release package to each node in a single step. Use the URL you copied in the previous step as an argument.
|
||||
```shell
|
||||
$ ghe-cluster-each -- "cd /home/admin && curl -L -O https://<em>PACKAGE-URL</em>.pkg"
|
||||
$ ghe-cluster-each -- "cd /home/admin && curl -L -O https://PACKAGE-URL.pkg"
|
||||
> ghe-app-node-1: % Total % Received % Xferd Average Speed Time Time Time Current
|
||||
> ghe-app-node-1: Dload Upload Total Spent Left Speed
|
||||
> 100 496M 100 496M 0 0 24.2M 0 0:00:20 0:00:20 --:--:-- 27.4M
|
||||
@@ -58,7 +58,7 @@ Use an upgrade package to upgrade a {% data variables.product.prodname_ghe_serve
|
||||
2. **With the exception of the primary MySQL node**, connect to the administrative shell of each of the {% data variables.product.prodname_ghe_server %} nodes.
|
||||
Run the `ghe-upgrade` command, providing the package file name you downloaded in Step 4 of [Preparing to upgrade](#preparing-to-upgrade):
|
||||
```shell
|
||||
$ ghe-upgrade <em>PACKAGE-FILENAME</em>.pkg
|
||||
$ ghe-upgrade PACKAGE-FILENAME.pkg
|
||||
> *** verifying upgrade package signature...
|
||||
> 497MB 0:00:04 [ 117MB/s] [==========================================>] 100%
|
||||
> gpg: Signature made Fri 19 Feb 2016 02:33:50 PM UTC using RSA key ID 0D65D57A
|
||||
@@ -70,7 +70,7 @@ Run the `ghe-upgrade` command, providing the package file name you downloaded in
|
||||
3. The upgrade process will reboot the node once it completes. Verify that you can `ping` each node after it reboots.
|
||||
4. Connect to the administrative shell of the primary MySQL node. Run the `ghe-upgrade` command, providing the package file name you downloaded in Step 4 of [Preparing to upgrade](#preparing-to-upgrade):
|
||||
```shell
|
||||
$ ghe-upgrade <em>PACKAGE-FILENAME</em>.pkg
|
||||
$ ghe-upgrade PACKAGE-FILENAME.pkg
|
||||
> *** verifying upgrade package signature...
|
||||
> 497MB 0:00:04 [ 117MB/s] [==========================================>] 100%
|
||||
> gpg: Signature made Fri 19 Feb 2016 02:33:50 PM UTC using RSA key ID 0D65D57A
|
||||
|
||||
@@ -24,13 +24,13 @@ shortTitle: Create HA replica
|
||||
{% data reusables.enterprise_installation.replica-steps %}
|
||||
1. Connect to the replica appliance's IP address using SSH.
|
||||
```shell
|
||||
$ ssh -p 122 admin@<em>REPLICA IP</em>
|
||||
$ ssh -p 122 admin@REPLICA_IP
|
||||
```
|
||||
{% data reusables.enterprise_installation.generate-replication-key-pair %}
|
||||
{% data reusables.enterprise_installation.add-ssh-key-to-primary %}
|
||||
1. To verify the connection to the primary and enable replica mode for the new replica, run `ghe-repl-setup` again.
|
||||
```shell
|
||||
$ ghe-repl-setup <em>PRIMARY IP</em>
|
||||
$ ghe-repl-setup PRIMARY_IP
|
||||
```
|
||||
{% data reusables.enterprise_installation.replication-command %}
|
||||
{% data reusables.enterprise_installation.verify-replication-channel %}
|
||||
@@ -41,27 +41,27 @@ This example configuration uses a primary and two replicas, which are located in
|
||||
|
||||
1. Create the first replica the same way you would for a standard two node configuration by running `ghe-repl-setup` on the first replica.
|
||||
```shell
|
||||
(replica1)$ ghe-repl-setup <em>PRIMARY IP</em>
|
||||
(replica1)$ ghe-repl-setup PRIMARY_IP
|
||||
(replica1)$ ghe-repl-start
|
||||
```
|
||||
2. Create a second replica and use the `ghe-repl-setup --add` command. The `--add` flag prevents it from overwriting the existing replication configuration and adds the new replica to the configuration.
|
||||
```shell
|
||||
(replica2)$ ghe-repl-setup --add <em>PRIMARY IP</em>
|
||||
(replica2)$ ghe-repl-setup --add PRIMARY_IP
|
||||
(replica2)$ ghe-repl-start
|
||||
```
|
||||
3. By default, replicas are configured to the same datacenter, and will now attempt to seed from an existing node in the same datacenter. Configure the replicas for different datacenters by setting a different value for the datacenter option. The specific values can be anything you would like as long as they are different from each other. Run the `ghe-repl-node` command on each node and specify the datacenter.
|
||||
|
||||
On the primary:
|
||||
```shell
|
||||
(primary)$ ghe-repl-node --datacenter <em>[PRIMARY DC NAME]</em>
|
||||
(primary)$ ghe-repl-node --datacenter [PRIMARY DC NAME]
|
||||
```
|
||||
On the first replica:
|
||||
```shell
|
||||
(replica1)$ ghe-repl-node --datacenter <em>[FIRST REPLICA DC NAME]</em>
|
||||
(replica1)$ ghe-repl-node --datacenter [FIRST REPLICA DC NAME]
|
||||
```
|
||||
On the second replica:
|
||||
```shell
|
||||
(replica2)$ ghe-repl-node --datacenter <em>[SECOND REPLICA DC NAME]</em>
|
||||
(replica2)$ ghe-repl-node --datacenter [SECOND REPLICA DC NAME]
|
||||
```
|
||||
{% tip %}
|
||||
|
||||
@@ -90,9 +90,9 @@ Configure Geo DNS using the IP addresses of the primary and replica nodes. You c
|
||||
For testing, you can add entries to the local workstation's `hosts` file (for example, `/etc/hosts`). These example entries will resolve requests for `HOSTNAME` to `replica2`. You can target specific hosts by commenting out different lines.
|
||||
|
||||
```
|
||||
# <primary IP> <em>HOSTNAME</em>
|
||||
# <replica1 IP> <em>HOSTNAME</em>
|
||||
<replica2 IP> <em>HOSTNAME</em>
|
||||
# <primary IP> HOSTNAME
|
||||
# <replica1 IP> HOSTNAME
|
||||
<replica2 IP> HOSTNAME
|
||||
```
|
||||
|
||||
## Further reading
|
||||
|
||||
@@ -57,7 +57,7 @@ The time required to failover depends on how long it takes to manually promote t
|
||||
```
|
||||
- On the new primary, remove the UUIDs using `ghe-repl-teardown`. Please replace *`UUID`* with a UUID you retrieved in the previous step.
|
||||
```shell
|
||||
$ ghe-repl-teardown -u <em>UUID</em>
|
||||
$ ghe-repl-teardown -u UUID
|
||||
```
|
||||
|
||||
## Further reading
|
||||
|
||||
@@ -29,16 +29,16 @@ You can use the former primary appliance as the new replica appliance if the fai
|
||||
|
||||
1. Connect to the former primary appliance's IP address using SSH.
|
||||
```shell
|
||||
$ ssh -p 122 admin@<em>FORMER PRIMARY IP</em>
|
||||
$ ssh -p 122 admin@ FORMER_PRIMARY_IP
|
||||
```
|
||||
1. Enable maintenance mode on the former primary appliance. For more information, see "[Enabling and scheduling maintenance mode](/admin/configuration/configuring-your-enterprise/enabling-and-scheduling-maintenance-mode)."
|
||||
1. On the former primary appliance, run `ghe-repl-setup` with the IP address of the former replica.
|
||||
```shell
|
||||
$ ghe-repl-setup <em>FORMER REPLICA IP</em>
|
||||
$ ghe-repl-setup FORMER_REPLICA_IP
|
||||
```
|
||||
{% data reusables.enterprise_installation.add-ssh-key-to-primary %}
|
||||
1. To verify the connection to the new primary and enable replica mode for the new replica, run `ghe-repl-setup` again.
|
||||
```shell
|
||||
$ ghe-repl-setup <em>FORMER REPLICA IP</em>
|
||||
$ ghe-repl-setup FORMER_REPLICA_IP
|
||||
```
|
||||
{% data reusables.enterprise_installation.replication-command %}
|
||||
|
||||
@@ -32,7 +32,7 @@ SNMP is a common standard for monitoring devices over a network. We strongly rec
|
||||
```shell
|
||||
# community-string is your community string
|
||||
# hostname is the IP or domain of your Enterprise instance
|
||||
$ snmpget -v 2c -c <em>community-string</em> -O e <em>hostname</em> hrSystemDate.0
|
||||
$ snmpget -v 2c -c COMMUNITY-STRING -O e HOSTNAME hrSystemDate.0
|
||||
```
|
||||
|
||||
This should return the system time on {% data variables.product.product_location %} host.
|
||||
@@ -79,7 +79,7 @@ With SNMP v2c, only hardware-level information about your appliance is available
|
||||
```shell
|
||||
# community-string is your community string
|
||||
# hostname is the IP or domain of your Enterprise instance
|
||||
$ snmpwalk -v 2c -c <em>community-string</em> -O e <em>hostname</em>
|
||||
$ snmpwalk -v 2c -c COMMUNITY-STRING -O e HOSTNAME
|
||||
```
|
||||
|
||||
Of the available MIBs for SNMP, the most useful is `HOST-RESOURCES-MIB` (1.3.6.1.2.1.25). See the table below for some important objects in this MIB:
|
||||
@@ -99,17 +99,17 @@ For example, to query for `hrMemorySize` with SNMP v3, run the following command
|
||||
# auth password is the authentication password
|
||||
# privacy password is the privacy password
|
||||
# hostname is the IP or domain of your Enterprise instance
|
||||
$ snmpget -v 3 -u <em>username</em> -l authPriv \
|
||||
-A "<em>auth password</em>" -a SHA \
|
||||
-X "<em>privacy password</em>" -x AES \
|
||||
-O e <em>hostname</em> HOST-RESOURCES-MIB::hrMemorySize.0
|
||||
$ snmpget -v 3 -u USERNAME -l authPriv \
|
||||
-A "AUTH PASSWORD" -a SHA \
|
||||
-X "PRIVACY PASSWORD" -x AES \
|
||||
-O e HOSTNAME HOST-RESOURCES-MIB::hrMemorySize.0
|
||||
```
|
||||
|
||||
With SNMP v2c, to query for `hrMemorySize`, run the following command on a separate workstation with SNMP support in your network:
|
||||
```shell
|
||||
# community-string is your community string
|
||||
# hostname is the IP or domain of your Enterprise instance
|
||||
snmpget -v 2c -c <em>community-string</em> <em>hostname</em> HOST-RESOURCES-MIB::hrMemorySize.0
|
||||
snmpget -v 2c -c COMMUNITY-STRING HOSTNAME HOST-RESOURCES-MIB::hrMemorySize.0
|
||||
```
|
||||
|
||||
{% tip %}
|
||||
|
||||
@@ -118,7 +118,7 @@ If the upgrade target you're presented with is a feature release instead of a pa
|
||||
{% data reusables.enterprise_installation.download-package %}
|
||||
4. Run the `ghe-upgrade` command using the package file name:
|
||||
```shell
|
||||
admin@<em>HOSTNAME</em>:~$ ghe-upgrade <em>GITHUB-UPGRADE.hpkg</em>
|
||||
admin@HOSTNAME:~$ ghe-upgrade GITHUB-UPGRADE.hpkg
|
||||
*** verifying upgrade package signature...
|
||||
```
|
||||
5. If a reboot is required for updates for kernel, MySQL, Elasticsearch or other programs, the hotpatch upgrade script notifies you.
|
||||
@@ -170,14 +170,14 @@ While you can use a hotpatch to upgrade to the latest patch release within a fea
|
||||
|
||||
5. Run the `ghe-upgrade` command using the package file name:
|
||||
```shell
|
||||
admin@<em>HOSTNAME</em>:~$ ghe-upgrade <em>GITHUB-UPGRADE.pkg</em>
|
||||
admin@HOSTNAME:~$ ghe-upgrade GITHUB-UPGRADE.pkg
|
||||
*** verifying upgrade package signature...
|
||||
```
|
||||
6. Confirm that you'd like to continue with the upgrade and restart after the package signature verifies. The new root filesystem writes to the secondary partition and the instance automatically restarts in maintenance mode:
|
||||
```shell
|
||||
*** applying update...
|
||||
This package will upgrade your installation to version <em>version-number</em>
|
||||
Current root partition: /dev/xvda1 [<em>version-number</em>]
|
||||
This package will upgrade your installation to version VERSION-NUMBER
|
||||
Current root partition: /dev/xvda1 [VERSION-NUMBER]
|
||||
Target root partition: /dev/xvda2
|
||||
Proceed with installation? [y/N]
|
||||
```
|
||||
|
||||
@@ -48,5 +48,5 @@ To more accurately mirror your production environment, you can optionally copy f
|
||||
* For Amazon S3 buckets, you can use [`aws s3 sync`](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/sync.html). For example:
|
||||
|
||||
```shell
|
||||
aws s3 sync s3://<em>SOURCE-BUCKET</em> s3://<em>DESTINATION-BUCKET</em>
|
||||
aws s3 sync s3://SOURCE-BUCKET s3://DESTINATION-BUCKET
|
||||
```
|
||||
|
||||
@@ -56,7 +56,7 @@ The `actions-sync` tool can only download actions from {% data variables.product
|
||||
Site administrators can use the `ghe-org-admin-promote` command in the administrative shell to promote a user to be an owner of the bundled `actions` organization. For more information, see "[Accessing the administrative shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)" and "[`ghe-org-admin-promote`](/admin/configuration/command-line-utilities#ghe-org-admin-promote)."
|
||||
|
||||
```shell
|
||||
ghe-org-admin-promote -u <em>USERNAME</em> -o actions
|
||||
ghe-org-admin-promote -u USERNAME -o actions
|
||||
```{% endif %}
|
||||
|
||||
## Example: Using the `actions-sync` tool
|
||||
|
||||
@@ -56,7 +56,7 @@ You can configure {% data variables.product.product_name %} to write verbose deb
|
||||
Some output in _auth.log_ may be Base64-encoded. You can access the administrative shell and use the `base64` utility on {% data variables.product.product_location %} to decode these responses. For more information, see "[Accessing the administrative shell (SSH)](/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh)."
|
||||
|
||||
```shell
|
||||
$ base64 --decode <em>ENCODED OUTPUT</em>
|
||||
$ base64 --decode ENCODED_OUTPUT
|
||||
```
|
||||
|
||||
## Error: "Another user already owns the account"
|
||||
|
||||
@@ -70,7 +70,7 @@ AMIs for {% data variables.product.prodname_ghe_server %} are available in the A
|
||||
1. Using the AWS CLI, get a list of {% data variables.product.prodname_ghe_server %} images published by {% data variables.product.prodname_dotcom %}'s AWS owner IDs (`025577942450` for GovCloud, and `895557238572` for other regions). For more information, see "[describe-images](http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html)" in the AWS documentation.
|
||||
```shell
|
||||
aws ec2 describe-images \
|
||||
--owners <em>OWNER ID</em> \
|
||||
--owners OWNER_ID \
|
||||
--query 'sort_by(Images,&Name)[*].{Name:Name,ImageID:ImageId}' \
|
||||
--output=text
|
||||
```
|
||||
@@ -82,14 +82,14 @@ If you're setting up your AMI for the first time, you will need to create a secu
|
||||
|
||||
1. Using the AWS CLI, create a new security group. For more information, see "[create-security-group](http://docs.aws.amazon.com/cli/latest/reference/ec2/create-security-group.html)" in the AWS documentation.
|
||||
```shell
|
||||
$ aws ec2 create-security-group --group-name <em>SECURITY_GROUP_NAME</em> --description "<em>SECURITY GROUP DESCRIPTION</em>"
|
||||
$ aws ec2 create-security-group --group-name SECURITY_GROUP_NAME --description "SECURITY GROUP DESCRIPTION"
|
||||
```
|
||||
|
||||
2. Take note of the security group ID (`sg-xxxxxxxx`) of your newly created security group.
|
||||
|
||||
3. Create a security group rule for each of the ports in the table below. For more information, see "[authorize-security-group-ingress](http://docs.aws.amazon.com/cli/latest/reference/ec2/authorize-security-group-ingress.html)" in the AWS documentation.
|
||||
```shell
|
||||
$ aws ec2 authorize-security-group-ingress --group-id <em>SECURITY_GROUP_ID</em> --protocol <em>PROTOCOL</em> --port <em>PORT_NUMBER</em> --cidr <em>SOURCE IP RANGE</em>
|
||||
$ aws ec2 authorize-security-group-ingress --group-id SECURITY_GROUP_ID --protocol PROTOCOL --port PORT_NUMBER --cidr SOURCE IP RANGE
|
||||
```
|
||||
This table identifies what each port is used for.
|
||||
|
||||
@@ -118,11 +118,11 @@ In the AWS CLI, launch an EC2 instance using your AMI and the security group you
|
||||
|
||||
```shell
|
||||
aws ec2 run-instances \
|
||||
--security-group-ids <em>SECURITY_GROUP_ID</em> \
|
||||
--instance-type <em>INSTANCE_TYPE</em> \
|
||||
--image-id <em>AMI_ID</em> \
|
||||
--block-device-mappings '[{"DeviceName":"/dev/xvdf","Ebs":{"VolumeSize":<em>SIZE</em>,"VolumeType":"<em>TYPE</em>"}}]' \
|
||||
--region <em>REGION</em> \
|
||||
--security-group-ids SECURITY_GROUP_ID \
|
||||
--instance-type INSTANCE_TYPE \
|
||||
--image-id AMI_ID \
|
||||
--block-device-mappings '[{"DeviceName":"/dev/xvdf","Ebs":{"VolumeSize":SIZE,"VolumeType":"TYPE"}}]' \
|
||||
--region REGION \
|
||||
--ebs-optimized
|
||||
```
|
||||
|
||||
|
||||
@@ -50,13 +50,13 @@ Before launching {% data variables.product.product_location %} on Azure, you'll
|
||||
Pass in options for the name of your VM, the resource group, the size of your VM, the name of your preferred Azure region, the name of the appliance image VM you listed in the previous step, and the storage SKU for premium storage. For more information about resource groups, see "[Resource groups](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-overview#resource-groups)" in the Microsoft documentation.
|
||||
|
||||
```shell
|
||||
$ az vm create -n <em>VM_NAME</em> -g <em>RESOURCE_GROUP</em> --size <em>VM_SIZE</em> -l <em>REGION</em> --image <em>APPLIANCE_IMAGE_NAME</em> --storage-sku Premium_LRS
|
||||
$ az vm create -n VM_NAME -g RESOURCE_GROUP --size VM_SIZE -l REGION --image APPLIANCE_IMAGE_NAME --storage-sku Premium_LRS
|
||||
```
|
||||
|
||||
3. Configure the security settings on your VM to open up required ports. For more information, see "[`az vm open-port`](https://docs.microsoft.com/cli/azure/vm?view=azure-cli-latest#az_vm_open_port)" in the Microsoft documentation. See the table below for a description of each port to determine what ports you need to open.
|
||||
|
||||
```shell
|
||||
$ az vm open-port -n <em>VM_NAME</em> -g <em>RESOURCE_GROUP</em> --port <em>PORT_NUMBER</em>
|
||||
$ az vm open-port -n VM_NAME -g RESOURCE_GROUP --port PORT_NUMBER
|
||||
```
|
||||
|
||||
This table identifies what each port is used for.
|
||||
@@ -68,7 +68,7 @@ Before launching {% data variables.product.product_location %} on Azure, you'll
|
||||
Pass in options for the name of your VM (for example, `ghe-acme-corp`), the resource group, the premium storage SKU, the size of the disk (for example, `100`), and a name for the resulting VHD.
|
||||
|
||||
```shell
|
||||
$ az vm disk attach --vm-name <em>VM_NAME</em> -g <em>RESOURCE_GROUP</em> --sku Premium_LRS --new -z <em>SIZE_IN_GB</em> --name ghe-data.vhd --caching ReadWrite
|
||||
$ az vm disk attach --vm-name VM_NAME -g RESOURCE_GROUP --sku Premium_LRS --new -z SIZE_IN_GB --name ghe-data.vhd --caching ReadWrite
|
||||
```
|
||||
|
||||
{% note %}
|
||||
@@ -81,7 +81,7 @@ Before launching {% data variables.product.product_location %} on Azure, you'll
|
||||
|
||||
1. Before configuring the VM, you must wait for it to enter ReadyRole status. Check the status of the VM with the `vm list` command. For more information, see "[`az vm list`](https://docs.microsoft.com/cli/azure/vm?view=azure-cli-latest#az_vm_list)" in the Microsoft documentation.
|
||||
```shell
|
||||
$ az vm list -d -g <em>RESOURCE_GROUP</em> -o table
|
||||
$ az vm list -d -g RESOURCE_GROUP -o table
|
||||
> Name ResourceGroup PowerState PublicIps Fqdns Location Zones
|
||||
> ------ --------------- ------------ ------------ ------- ---------- -------
|
||||
> VM_NAME RESOURCE_GROUP VM running 40.76.79.202 eastus
|
||||
|
||||
@@ -48,12 +48,12 @@ GCE virtual machines are created as a member of a network, which has a firewall.
|
||||
|
||||
1. Using the gcloud compute command-line tool, create the network. For more information, see "[gcloud compute networks create](https://cloud.google.com/sdk/gcloud/reference/compute/networks/create)" in the Google documentation.
|
||||
```shell
|
||||
$ gcloud compute networks create <em>NETWORK-NAME</em> --subnet-mode auto
|
||||
$ gcloud compute networks create NETWORK-NAME --subnet-mode auto
|
||||
```
|
||||
2. Create a firewall rule for each of the ports in the table below. For more information, see "[gcloud compute firewall-rules](https://cloud.google.com/sdk/gcloud/reference/compute/firewall-rules/)" in the Google documentation.
|
||||
```shell
|
||||
$ gcloud compute firewall-rules create <em>RULE-NAME</em> \
|
||||
--network <em>NETWORK-NAME</em> \
|
||||
$ gcloud compute firewall-rules create RULE-NAME \
|
||||
--network NETWORK-NAME \
|
||||
--allow tcp:22,tcp:25,tcp:80,tcp:122,udp:161,tcp:443,udp:1194,tcp:8080,tcp:8443,tcp:9418,icmp
|
||||
```
|
||||
This table identifies the required ports and what each port is used for.
|
||||
@@ -72,18 +72,18 @@ To create the {% data variables.product.prodname_ghe_server %} instance, you'll
|
||||
|
||||
1. Using the gcloud compute command-line tool, create a data disk to use as an attached storage volume for your instance data, and configure the size based on your user license count. For more information, see "[gcloud compute disks create](https://cloud.google.com/sdk/gcloud/reference/compute/disks/create)" in the Google documentation.
|
||||
```shell
|
||||
$ gcloud compute disks create <em>DATA-DISK-NAME</em> --size <em>DATA-DISK-SIZE</em> --type <em>DATA-DISK-TYPE</em> --zone <em>ZONE</em>
|
||||
$ gcloud compute disks create DATA-DISK-NAME --size DATA-DISK-SIZE --type DATA-DISK-TYPE --zone ZONE
|
||||
```
|
||||
|
||||
2. Then create an instance using the name of the {% data variables.product.prodname_ghe_server %} image you selected, and attach the data disk. For more information, see "[gcloud compute instances create](https://cloud.google.com/sdk/gcloud/reference/compute/instances/create)" in the Google documentation.
|
||||
```shell
|
||||
$ gcloud compute instances create <em>INSTANCE-NAME</em> \
|
||||
$ gcloud compute instances create INSTANCE-NAME \
|
||||
--machine-type n1-standard-8 \
|
||||
--image <em>GITHUB-ENTERPRISE-IMAGE-NAME</em> \
|
||||
--disk name=<em>DATA-DISK-NAME</em> \
|
||||
--image GITHUB-ENTERPRISE-IMAGE-NAME \
|
||||
--disk name=DATA-DISK-NAME \
|
||||
--metadata serial-port-enable=1 \
|
||||
--zone <em>ZONE</em> \
|
||||
--network <em>NETWORK-NAME</em> \
|
||||
--zone ZONE \
|
||||
--network NETWORK-NAME \
|
||||
--image-project github-enterprise-public
|
||||
```
|
||||
|
||||
|
||||
@@ -38,23 +38,23 @@ shortTitle: Install on Hyper-V
|
||||
|
||||
1. In PowerShell, create a new Generation 1 virtual machine, configure the size based on your user license count, and attach the {% data variables.product.prodname_ghe_server %} image you downloaded. For more information, see "[New-VM](https://docs.microsoft.com/powershell/module/hyper-v/new-vm?view=win10-ps)" in the Microsoft documentation.
|
||||
```shell
|
||||
PS C:\> New-VM -Generation 1 -Name <em>VM_NAME</em> -MemoryStartupBytes <em>MEMORY_SIZE</em> -BootDevice VHD -VHDPath <em>PATH_TO_VHD</em>
|
||||
PS C:\> New-VM -Generation 1 -Name VM_NAME -MemoryStartupBytes MEMORY_SIZE -BootDevice VHD -VHDPath PATH_TO_VHD
|
||||
```
|
||||
{% data reusables.enterprise_installation.create-attached-storage-volume %} Replace `PATH_TO_DATA_DISK` with the path to the location where you create the disk. For more information, see "[New-VHD](https://docs.microsoft.com/powershell/module/hyper-v/new-vhd?view=win10-ps)" in the Microsoft documentation.
|
||||
```shell
|
||||
PS C:\> New-VHD -Path <em>PATH_TO_DATA_DISK</em> -SizeBytes <em>DISK_SIZE</em>
|
||||
PS C:\> New-VHD -Path PATH_TO_DATA_DISK -SizeBytes DISK_SIZE
|
||||
```
|
||||
3. Attach the data disk to your instance. For more information, see "[Add-VMHardDiskDrive](https://docs.microsoft.com/powershell/module/hyper-v/add-vmharddiskdrive?view=win10-ps)" in the Microsoft documentation.
|
||||
```shell
|
||||
PS C:\> Add-VMHardDiskDrive -VMName <em>VM_NAME</em> -Path <em>PATH_TO_DATA_DISK</em>
|
||||
PS C:\> Add-VMHardDiskDrive -VMName VM_NAME -Path PATH_TO_DATA_DISK
|
||||
```
|
||||
4. Start the VM. For more information, see "[Start-VM](https://docs.microsoft.com/powershell/module/hyper-v/start-vm?view=win10-ps)" in the Microsoft documentation.
|
||||
```shell
|
||||
PS C:\> Start-VM -Name <em>VM_NAME</em>
|
||||
PS C:\> Start-VM -Name VM_NAME
|
||||
```
|
||||
5. Get the IP address of your VM. For more information, see "[Get-VMNetworkAdapter](https://docs.microsoft.com/powershell/module/hyper-v/get-vmnetworkadapter?view=win10-ps)" in the Microsoft documentation.
|
||||
```shell
|
||||
PS C:\> (Get-VMNetworkAdapter -VMName <em>VM_NAME</em>).IpAddresses
|
||||
PS C:\> (Get-VMNetworkAdapter -VMName VM_NAME).IpAddresses
|
||||
```
|
||||
6. Copy the VM's IP address and paste it into a web browser.
|
||||
|
||||
|
||||
@@ -43,6 +43,6 @@ Push log entries show:
|
||||
{% data reusables.enterprise_installation.ssh-into-instance %}
|
||||
1. In the appropriate Git repository, open the audit log file:
|
||||
```shell
|
||||
ghe-repo <em>owner</em>/<em>repository</em> -c "cat audit_log"
|
||||
ghe-repo OWNER/REPOSITORY -c "cat audit_log"
|
||||
```
|
||||
{% endif %}
|
||||
|
||||
@@ -86,12 +86,6 @@ For information on creating or accessing your access key ID and secret key, see
|
||||
{% ifversion streaming-oidc-s3 %}
|
||||
#### Setting up streaming to S3 with OpenID Connect
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Streaming to Amazon S3 with OpenID Connect is currently in beta and subject to change.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
1. In AWS, add the {% data variables.product.prodname_dotcom %} OIDC provider to IAM. For more information, see [Creating OpenID Connect (OIDC) identity providers](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html) in the AWS documentation.
|
||||
|
||||
- For the provider URL, use `https://oidc-configuration.audit-log.githubusercontent.com`.
|
||||
|
||||
@@ -121,7 +121,7 @@ For more information about the audit log REST API, see "[Enterprise administrati
|
||||
The query below searches for audit log events created on Jan 1st, 2022 in the `avocado-corp` enterprise, and return the first page with a maximum of 100 items per page using [REST API pagination](/rest/overview/resources-in-the-rest-api#pagination):
|
||||
|
||||
```shell
|
||||
curl -H "Authorization: Bearer <em>TOKEN</em>" \
|
||||
curl -H "Authorization: Bearer TOKEN" \
|
||||
--request GET \
|
||||
"https://api.github.com/enterprises/avocado-corp/audit-log?phrase=created:2022-01-01&page=1&per_page=100"
|
||||
```
|
||||
@@ -133,7 +133,7 @@ You can specify multiple search phrases, such as `created` and `actor`, by separ
|
||||
The query below searches for audit log events for pull requests, where the event occurred on or after Jan 1st, 2022 in the `avocado-corp` enterprise, and the action was performed by the `octocat` user:
|
||||
|
||||
```shell
|
||||
curl -H "Authorization: Bearer <em>TOKEN</em>" \
|
||||
curl -H "Authorization: Bearer TOKEN" \
|
||||
--request GET \
|
||||
"https://api.github.com/enterprises/avocado-corp/audit-log?phrase=action:pull_request+created:>=2022-01-01+actor:octocat"
|
||||
```
|
||||
|
||||
@@ -121,7 +121,7 @@ Other modes of MinIO remain available with standard support.
|
||||
|
||||
```shell
|
||||
$ export MC_HOST_minio="http://${MINIO_ACCESS_KEY}:${MINIO_SECRET_KEY} @localhost:9000"
|
||||
$ docker run minio/mc <em>BUCKET-NAME</em>
|
||||
$ docker run minio/mc BUCKET-NAME
|
||||
```
|
||||
|
||||
This example can be used for MinIO standalone or MinIO as a NAS gateway.
|
||||
|
||||
@@ -69,7 +69,7 @@ The following variables are always available in the pre-receive hook environment
|
||||
| :- | :- | :- |
|
||||
| <pre>$GIT_DIR</pre> | Path to the remote repository on the instance | /data/user/repositories/a/ab/<br>a1/b2/34/100001234/1234.git |
|
||||
| <pre>$GIT_PUSH_OPTION_COUNT</pre> | The number of push options that were sent by the client with `--push-option`. For more information, see "[git-push](https://git-scm.com/docs/git-push#Documentation/git-push.txt---push-optionltoptiongt)" in the Git documentation. | 1 |
|
||||
| <pre>$GIT\_PUSH\_OPTION\_<em>N</em></pre> | Where _N_ is an integer starting at 0, this variable contains the push option string that was sent by the client. The first option that was sent is stored in `GIT_PUSH_OPTION_0`, the second option that was sent is stored in `GIT_PUSH_OPTION_1`, and so on. For more information about push options, see "[git-push](https://git-scm.com/docs/git-push#git-push---push-optionltoptiongt)" in the Git documentation. | abcd |{% ifversion ghes %}
|
||||
| <pre>$GIT\_PUSH\_OPTION\_N</pre> | Where _N_ is an integer starting at 0, this variable contains the push option string that was sent by the client. The first option that was sent is stored in `GIT_PUSH_OPTION_0`, the second option that was sent is stored in `GIT_PUSH_OPTION_1`, and so on. For more information about push options, see "[git-push](https://git-scm.com/docs/git-push#git-push---push-optionltoptiongt)" in the Git documentation. | abcd |{% ifversion ghes %}
|
||||
| <pre>$GIT_USER_AGENT</pre> | User-agent string sent by the Git client that pushed the changes | git/2.0.0{% endif %}
|
||||
| <pre>$GITHUB_REPO_NAME</pre> | Name of the repository being updated in _NAME_/_OWNER_ format | octo-org/hello-enterprise |
|
||||
| <pre>$GITHUB_REPO_PUBLIC</pre> | Boolean representing whether the repository being updated is public | <ul><li>true: Repository's visibility is public</li><li>false: Repository's visibility is private or internal</li></ul>
|
||||
@@ -102,7 +102,7 @@ The `$GITHUB_VIA` variable is available in the pre-receive hook environment when
|
||||
| <pre>releases delete button</pre> | Deletion of a release | "[Managing releases in a repository](/github/administering-a-repository/managing-releases-in-a-repository#deleting-a-release)" |
|
||||
| <pre>stafftools branch restore</pre> | Restoration of a branch from the site admin dashboard | "[Site admin dashboard](/admin/configuration/site-admin-dashboard#repositories)" |
|
||||
| <pre>tag create api</pre> | Creation of a tag via the API | "[Git database](/rest/reference/git#create-a-tag-object)" in the REST API documentation |
|
||||
| <pre>slumlord (#<em>SHA</em>)</pre> | Commit via Subversion | "[Support for Subversion clients](/github/importing-your-projects-to-github/support-for-subversion-clients#making-commits-to-subversion)" |
|
||||
| <pre>slumlord (#SHA)</pre> | Commit via Subversion | "[Support for Subversion clients](/github/importing-your-projects-to-github/support-for-subversion-clients#making-commits-to-subversion)" |
|
||||
| <pre>web branch create</pre> | Creation of a branch via the web interface | "[Creating and deleting branches within your repository](/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository#creating-a-branch)" |
|
||||
|
||||
#### Available for pull request merges
|
||||
@@ -130,18 +130,18 @@ We recommend consolidating hooks to a single repository. If the consolidated hoo
|
||||
1. For Mac users, ensure the scripts have execute permissions:
|
||||
|
||||
```shell
|
||||
$ sudo chmod +x <em>SCRIPT_FILE.sh</em>
|
||||
$ sudo chmod +x SCRIPT_FILE.sh
|
||||
```
|
||||
For Windows users, ensure the scripts have execute permissions:
|
||||
|
||||
```shell
|
||||
git update-index --chmod=+x <em>SCRIPT_FILE.sh</em>
|
||||
git update-index --chmod=+x SCRIPT_FILE.sh
|
||||
```
|
||||
|
||||
2. Commit and push to the designated repository for pre-receive hooks on {% data variables.product.product_location %}.
|
||||
|
||||
```shell
|
||||
$ git commit -m "<em>YOUR COMMIT MESSAGE</em>"
|
||||
$ git commit -m "YOUR COMMIT MESSAGE"
|
||||
$ git push
|
||||
```
|
||||
|
||||
|
||||
@@ -82,20 +82,20 @@ For more information, see "[About {% data variables.large_files.product_name_lon
|
||||
> git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1; git 94d356c)
|
||||
> git version 2.7.4 (Apple Git-66)
|
||||
|
||||
> Endpoint=https://<em>GITHUB-ENTERPRISE-HOST</em>/path/to/repo/info/lfs (auth=basic)
|
||||
> Endpoint=https://GITHUB-ENTERPRISE-HOST/path/to/repo/info/lfs (auth=basic)
|
||||
|
||||
# Create .lfsconfig that points to third party server.
|
||||
$ git config -f .lfsconfig remote.origin.lfsurl https://<em>THIRD-PARTY-LFS-SERVER</em>/path/to/repo
|
||||
$ git config -f .lfsconfig remote.origin.lfsurl https://THIRD-PARTY-LFS-SERVER/path/to/repo
|
||||
$ git lfs env
|
||||
> git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1; git 94d356c)
|
||||
> git version 2.7.4 (Apple Git-66)
|
||||
|
||||
> Endpoint=https://<em>THIRD-PARTY-LFS-SERVER</em>/path/to/repo/info/lfs (auth=none)
|
||||
> Endpoint=https://THIRD-PARTY-LFS-SERVER/path/to/repo/info/lfs (auth=none)
|
||||
|
||||
# Show the contents of .lfsconfig
|
||||
$ cat .lfsconfig
|
||||
[remote "origin"]
|
||||
lfsurl = https://<em>THIRD-PARTY-LFS-SERVER</em>/path/to/repo
|
||||
lfsurl = https://THIRD-PARTY-LFS-SERVER/path/to/repo
|
||||
```
|
||||
|
||||
3. To keep the same {% data variables.large_files.product_name_short %} configuration for each user, commit a custom `.lfsconfig` file to the repository.
|
||||
@@ -111,14 +111,14 @@ Before migrating to a different {% data variables.large_files.product_name_long
|
||||
|
||||
1. Configure the repository with a second remote.
|
||||
```shell
|
||||
$ git remote add <em>NEW-REMOTE</em> https://<em>NEW-REMOTE-HOSTNAME</em>/path/to/repo
|
||||
$ git remote add NEW-REMOTE https://NEW-REMOTE-HOSTNAME/path/to/repo
|
||||
|
||||
$ git lfs env
|
||||
> git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1; git 94d356c)
|
||||
> git version 2.7.4 (Apple Git-66)
|
||||
|
||||
> Endpoint=https://<em>GITHUB-ENTERPRISE-HOST</em>/path/to/repo/info/lfs (auth=basic)
|
||||
> Endpoint (<em>NEW-REMOTE</em>)=https://<em>NEW-REMOTE-HOSTNAME</em>/path/to/repo/info/lfs (auth=none)
|
||||
> Endpoint=https://GITHUB-ENTERPRISE-HOST/path/to/repo/info/lfs (auth=basic)
|
||||
> Endpoint (NEW-REMOTE)=https://NEW-REMOTE-HOSTNAME/path/to/repo/info/lfs (auth=none)
|
||||
```
|
||||
|
||||
2. Fetch all objects from the old remote.
|
||||
@@ -132,7 +132,7 @@ Before migrating to a different {% data variables.large_files.product_name_long
|
||||
|
||||
3. Push all objects to the new remote.
|
||||
```shell
|
||||
$ git lfs push <em>NEW-REMOTE</em> --all
|
||||
$ git lfs push NEW-REMOTE --all
|
||||
> Scanning for all objects ever referenced...
|
||||
> ✔ 16 objects found
|
||||
> Pushing objects...
|
||||
|
||||
@@ -34,8 +34,8 @@ After you click the "Begin audit" button, all SSH keys are invalidated and will
|
||||
If a user attempts to perform any git operation over SSH, it will fail and provide them with the following message:
|
||||
|
||||
```shell
|
||||
ERROR: Hi <em>username</em>. We're doing an SSH key audit.
|
||||
Please visit http(s)://<em>hostname</em>/settings/ssh/audit/2
|
||||
ERROR: Hi USERNAME. We're doing an SSH key audit.
|
||||
Please visit http(s)://HOSTNAME/settings/ssh/audit/2
|
||||
to approve this key so we know it's safe.
|
||||
Fingerprint: ed:21:60:64:c0:dc:2b:16:0f:54:5f:2b:35:2a:94:91
|
||||
fatal: The remote end hung up unexpectedly
|
||||
|
||||
@@ -50,7 +50,7 @@ For information about promoting a user to an organization owner, see the `ghe-or
|
||||
1. [SSH](/enterprise/admin/guides/installation/accessing-the-administrative-shell-ssh/) into your appliance.
|
||||
2. Run [ghe-user-promote](/enterprise/admin/guides/installation/command-line-utilities#ghe-user-promote) with the username to promote.
|
||||
```shell
|
||||
$ ghe-user-promote <em>username</em>
|
||||
$ ghe-user-promote USERNAME
|
||||
```
|
||||
|
||||
## Demoting a site administrator from the command line
|
||||
@@ -58,5 +58,5 @@ For information about promoting a user to an organization owner, see the `ghe-or
|
||||
1. [SSH](/enterprise/admin/guides/installation/accessing-the-administrative-shell-ssh/) into your appliance.
|
||||
2. Run [ghe-user-demote](/enterprise/admin/guides/installation/command-line-utilities#ghe-user-demote) with the username to demote.
|
||||
```shell
|
||||
$ ghe-user-demote <em>username</em>
|
||||
$ ghe-user-demote USERNAME
|
||||
```
|
||||
|
||||
@@ -71,7 +71,7 @@ As when suspending a user, unsuspending a user takes effect immediately. The use
|
||||
{% data reusables.enterprise_installation.ssh-into-instance %}
|
||||
2. Run [ghe-user-suspend](/enterprise/admin/guides/installation/command-line-utilities#ghe-user-suspend) with the username to suspend.
|
||||
```shell
|
||||
$ ghe-user-suspend <em>username</em>
|
||||
$ ghe-user-suspend USERNAME
|
||||
```
|
||||
|
||||
## Creating a custom message for suspended users
|
||||
@@ -96,7 +96,7 @@ You can create a custom message that suspended users will see when attempting to
|
||||
{% data reusables.enterprise_installation.ssh-into-instance %}
|
||||
2. Run [ghe-user-unsuspend](/enterprise/admin/guides/installation/command-line-utilities#ghe-user-unsuspend) with the username to unsuspend.
|
||||
```shell
|
||||
$ ghe-user-unsuspend <em>username</em>
|
||||
$ ghe-user-unsuspend USERNAME
|
||||
```
|
||||
|
||||
## Further reading
|
||||
|
||||
@@ -44,11 +44,11 @@ The Migrations API is currently in a preview period, which means that the endpoi
|
||||
* Your access token for authentication.
|
||||
* A [list of the repositories](/free-pro-team@latest/rest/repos#list-organization-repositories) you want to migrate:
|
||||
```shell
|
||||
curl -H "Authorization: Bearer <em>GITHUB_ACCESS_TOKEN</em>" \
|
||||
curl -H "Authorization: Bearer GITHUB_ACCESS_TOKEN" \
|
||||
-X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-d'{"lock_repositories":true,"repositories":["<em>orgname</em>/<em>reponame</em>", "<em>orgname</em>/<em>reponame</em>"]}' \
|
||||
https://api.github.com/orgs/<em>orgname</em>/migrations
|
||||
-d'{"lock_repositories":true,"repositories":["ORG_NAME</em>/REPO_NAME", "ORG_NAME/REPO_NAME"]}' \
|
||||
https://api.github.com/orgs/ORG_NAME/migrations
|
||||
```
|
||||
* If you want to lock the repositories before migrating them, make sure `lock_repositories` is set to `true`. This is highly recommended.
|
||||
* You can exclude file attachments by passing `exclude_attachments: true` to the endpoint. {% data reusables.enterprise_migrations.exclude-file-attachments %} The final archive size must be less than 20 GB.
|
||||
@@ -59,9 +59,9 @@ The Migrations API is currently in a preview period, which means that the endpoi
|
||||
* Your access token for authentication.
|
||||
* The unique `id` of the migration:
|
||||
```shell
|
||||
curl -H "Authorization: Bearer <em>GITHUB_ACCESS_TOKEN</em>" \
|
||||
curl -H "Authorization: Bearer GITHUB_ACCESS_TOKEN" \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
https://api.github.com/orgs/<em>orgname</em>/migrations/<em>id</em>
|
||||
https://api.github.com/orgs/ORG_NAME/migrations/ID
|
||||
```
|
||||
|
||||
A migration can be in one of the following states:
|
||||
@@ -74,19 +74,19 @@ The Migrations API is currently in a preview period, which means that the endpoi
|
||||
* Your access token for authentication.
|
||||
* The unique `id` of the migration:
|
||||
```shell
|
||||
curl -H "Authorization: Bearer <em>GITHUB_ACCESS_TOKEN</em>" \
|
||||
curl -H "Authorization: Bearer GITHUB_ACCESS_TOKEN" \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-L -o migration_archive.tar.gz \
|
||||
https://api.github.com/orgs/<em>orgname</em>/migrations/<em>id</em>/archive
|
||||
https://api.github.com/orgs/ORG_NAME/migrations/ID/archive
|
||||
```
|
||||
|
||||
5. The migration archive is automatically deleted after seven days. If you would prefer to delete it sooner, you can send a `DELETE` request to [the migration archive delete endpoint](/free-pro-team@latest/rest/migrations#delete-an-organization-migration-archive). You'll need:
|
||||
* Your access token for authentication.
|
||||
* The unique `id` of the migration:
|
||||
```shell
|
||||
curl -H "Authorization: Bearer <em>GITHUB_ACCESS_TOKEN</em>" \
|
||||
curl -H "Authorization: Bearer GITHUB_ACCESS_TOKEN" \
|
||||
-X DELETE \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
https://api.github.com/orgs/<em>orgname</em>/migrations/<em>id</em>/archive
|
||||
https://api.github.com/orgs/ORG_NAME/migrations/ID/archive
|
||||
```
|
||||
{% data reusables.enterprise_migrations.ready-to-import-migrations %}
|
||||
|
||||
@@ -35,12 +35,12 @@ shortTitle: Export from your enterprise
|
||||
2. To prepare a repository for export, use the `ghe-migrator add` command with the repository's URL:
|
||||
* If you're locking the repository, append the command with `--lock`. If you're performing a trial run, `--lock` is not needed.
|
||||
```shell
|
||||
$ ghe-migrator add https://<em>hostname</em>/<em>username</em>/<em>reponame</em> --lock
|
||||
$ ghe-migrator add https://HOSTNAME/USERNAME/REPO-NAME --lock
|
||||
```
|
||||
* You can exclude file attachments by appending `--exclude_attachments` to the command. {% data reusables.enterprise_migrations.exclude-file-attachments %}
|
||||
* To prepare multiple repositories at once for export, create a text file listing each repository URL on a separate line, and run the `ghe-migrator add` command with the `-i` flag and the path to your text file.
|
||||
```shell
|
||||
$ ghe-migrator add -i <em>PATH</em>/<em>TO</em>/<em>YOUR</em>/<em>REPOSITORY_URLS</em>.txt
|
||||
$ ghe-migrator add -i PATH/TO/YOUR/REPOSITORY_URL.txt
|
||||
```
|
||||
|
||||
3. When prompted, enter your {% data variables.product.prodname_ghe_server %} username:
|
||||
@@ -54,7 +54,7 @@ shortTitle: Export from your enterprise
|
||||
5. When `ghe-migrator add` has finished it will print the unique "Migration GUID" that it generated to identify this export as well as a list of the resources that were added to the export. You will use the Migration GUID that it generated in subsequent `ghe-migrator add` and `ghe-migrator export` steps to tell `ghe-migrator` to continue operating on the same export.
|
||||
```shell
|
||||
> 101 models added to export
|
||||
> Migration GUID: <em>example-migration-guid</em>
|
||||
> Migration GUID: EXAMPLE-MIGRATION-GUID
|
||||
> Number of records in this migration:
|
||||
> users | 5
|
||||
> organizations | 1
|
||||
@@ -78,17 +78,17 @@ shortTitle: Export from your enterprise
|
||||
3. If you locked the source repository, you can use the `ghe-migrator target_url` command to set a custom lock message on the repository page that links to the repository's new location. Pass the source repository URL, the target repository URL, and the Migration GUID from Step 5:
|
||||
|
||||
```shell
|
||||
$ ghe-migrator target_url https://<em>hostname</em>/<em>username</em>/<em>reponame</em> https://<em>target_hostname</em>/<em>target_username</em>/<em>target_reponame</em> -g <em>MIGRATION_GUID</em>
|
||||
$ ghe-migrator target_url https://HOSTNAME/USERNAME/REPO-NAME https://TARGET-HOSTNAME/TARGET-USER-NAME/TARGET-REPO-NAME -g MIGRATION-GUID
|
||||
```
|
||||
|
||||
6. To add more repositories to the same export, use the `ghe-migrator add` command with the `-g` flag. You'll pass in the new repository URL and the Migration GUID from Step 5:
|
||||
```shell
|
||||
$ ghe-migrator add https://<em>hostname</em>/<em>username</em>/<em>other_reponame</em> -g <em>MIGRATION_GUID</em> --lock
|
||||
$ ghe-migrator add https://HOSTNAME/USERNAME/OTHER-REPO-NAME -g MIGRATION-GUID --lock
|
||||
```
|
||||
7. When you've finished adding repositories, generate the migration archive using the `ghe-migrator export` command with the `-g` flag and the Migration GUID from Step 5:
|
||||
```shell
|
||||
$ ghe-migrator export -g <em>MIGRATION_GUID</em>
|
||||
> Archive saved to: /data/github/current/tmp/<em>MIGRATION_GUID</em>.tar.gz
|
||||
$ ghe-migrator export -g MIGRATION-GUID
|
||||
> Archive saved to: /data/github/current/tmp/MIGRATION-GUID.tar.gz
|
||||
```
|
||||
* {% data reusables.enterprise_migrations.specify-staging-path %}
|
||||
|
||||
@@ -96,10 +96,10 @@ shortTitle: Export from your enterprise
|
||||
```shell
|
||||
$ exit
|
||||
> logout
|
||||
> Connection to <em>hostname</em> closed.
|
||||
> Connection to HOSTNAME closed.
|
||||
```
|
||||
9. Copy the migration archive to your computer using the [`scp`](https://acloudguru.com/blog/engineering/ssh-and-scp-howto-tips-tricks#scp) command. The archive file will be named with the Migration GUID:
|
||||
```shell
|
||||
$ scp -P 122 admin@<em>hostname</em>:/data/github/current/tmp/<em>MIGRATION_GUID</em>.tar.gz ~/Desktop
|
||||
$ scp -P 122 admin@HOSTNAME:/data/github/current/tmp/MIGRATION-GUID.tar.gz ~/Desktop
|
||||
```
|
||||
{% data reusables.enterprise_migrations.ready-to-import-migrations %}
|
||||
|
||||
@@ -18,19 +18,19 @@ shortTitle: Import from another VCS
|
||||
{% data reusables.enterprise_installation.ssh-into-instance %}
|
||||
2. Make a raw clone of the project using the command below, specifying the URL of the source project, and a path to a temporary repository:
|
||||
```shell
|
||||
$ git-import-hg-raw <em>HG-CLONE-URL</em> /<em>PATH</em>/<em>REPO-NAME</em>.git
|
||||
$ git-import-hg-raw HG-CLONE-URL/PATH/REPO-NAME.git
|
||||
# Creates a new repository with one or more Git refs in "refs/import/" in the specified path.
|
||||
```
|
||||
{% data reusables.enterprise_migrations.review-the-import-csv %}
|
||||
4. Rewrite the authors and branches using the CSV file:
|
||||
```shell
|
||||
$ git-import-rewrite --flavor hg --authors /<em>PATH</em>/<em>AUTHORS-MAP-FILE</em>.csv /<em>PATH</em>/<em>REPO-NAME</em>.git
|
||||
$ git-import-rewrite --flavor hg --authors /PATH/AUTHORS-MAP-FILE.csv /PATH/REPO-NAME.git
|
||||
```
|
||||
5. If you haven't yet, [create a new empty repository on {% data variables.product.prodname_ghe_server %}](/enterprise/user/articles/creating-a-new-repository).
|
||||
{% data reusables.command_line.switching_directories_procedural %}
|
||||
7. Push the imported repository to {% data variables.product.prodname_ghe_server %}:
|
||||
```shell
|
||||
$ git push --mirror <em>PUSH-URL-ON-GITHUB-ENTERPRISE</em>
|
||||
$ git push --mirror PUSH-URL-ON-GITHUB-ENTERPRISE
|
||||
```
|
||||
|
||||
## Importing projects from Subversion
|
||||
@@ -38,19 +38,19 @@ shortTitle: Import from another VCS
|
||||
{% data reusables.enterprise_installation.ssh-into-instance %}
|
||||
2. Make a raw clone of the project using the command below, specifying the URL of the source project, and a path to a temporary repository:
|
||||
```shell
|
||||
$ git-import-svn-raw <em>SVN-CLONE-URL</em> /<em>PATH</em>/<em>REPO-NAME</em>.git
|
||||
$ git-import-svn-raw SVN-CLONE-URL /PATH/REPO-NAME.git
|
||||
# Creates a new repository with one or more Git refs in "refs/import/" in the specified path.
|
||||
```
|
||||
{% data reusables.enterprise_migrations.review-the-import-csv %}
|
||||
4. Rewrite the authors and branches using the CSV file:
|
||||
```shell
|
||||
$ git-import-rewrite --flavor svn --authors /<em>PATH</em>/<em>AUTHORS-MAP-FILE</em>.csv /<em>PATH</em>/<em>REPO-NAME</em>.git
|
||||
$ git-import-rewrite --flavor svn --authors /PATH/AUTHORS-MAP-FILE.csv /PATH/REPO-NAME.git
|
||||
```
|
||||
5. If you haven't yet, [create a new empty repository on {% data variables.product.prodname_ghe_server %}](/enterprise/user/articles/creating-a-new-repository).
|
||||
{% data reusables.command_line.switching_directories_procedural %}
|
||||
7. Push the imported repository to {% data variables.product.prodname_ghe_server %}:
|
||||
```shell
|
||||
$ git push --mirror <em>PUSH-URL-ON-GITHUB-ENTERPRISE</em>
|
||||
$ git push --mirror PUSH-URL-ON-GITHUB-ENTERPRISE
|
||||
```
|
||||
|
||||
## Importing projects from Team Foundation Version Control
|
||||
@@ -58,19 +58,19 @@ shortTitle: Import from another VCS
|
||||
{% data reusables.enterprise_installation.ssh-into-instance %}
|
||||
2. Make a raw clone of the project using the command below, specifying the URL of the source project, and a path to a temporary repository:
|
||||
```shell
|
||||
$ git-import-tfs-raw <em>TEAM-FOUNDATION-CLONE-URL</em> /<em>PATH</em>/<em>REPO-NAME</em>.git
|
||||
$ git-import-tfs-raw TEAM-FOUNDATION-CLONE-URL /PATH/REPO-NAME.git
|
||||
# Creates a new repository with one or more Git refs in "refs/import/" in the specified path.
|
||||
```
|
||||
{% data reusables.enterprise_migrations.review-the-import-csv %}
|
||||
4. Rewrite the authors and branches using the CSV file:
|
||||
```shell
|
||||
$ git-import-rewrite --flavor tfs --authors /<em>PATH</em>/<em>AUTHORS-MAP-FILE</em>.csv /<em>PATH</em>/<em>REPO-NAME</em>.git
|
||||
$ git-import-rewrite --flavor tfs --authors /PATH/AUTHORS-MAP-FILE.csv /PATH/REPO_NAME.git
|
||||
```
|
||||
5. If you haven't yet, [create a new empty repository on {% data variables.product.prodname_ghe_server %}](/enterprise/user/articles/creating-a-new-repository).
|
||||
{% data reusables.command_line.switching_directories_procedural %}
|
||||
7. Push the imported repository to {% data variables.product.prodname_ghe_server %}:
|
||||
```shell
|
||||
$ git push --mirror <em>PUSH-URL-ON-GITHUB-ENTERPRISE</em>
|
||||
$ git push --mirror PUSH-URL-ON-GITHUB-ENTERPRISE
|
||||
```
|
||||
|
||||
## Further reading
|
||||
|
||||
@@ -33,7 +33,7 @@ After you prepare the data and resolve conflicts, you can apply the imported dat
|
||||
* Your personal access token for authentication. The personal access token that you use is only for authentication as a site administrator, and does not require any specific scope. For more information, see "[Creating a personal access token](/github/authenticating-to-github/creating-a-personal-access-token)."
|
||||
|
||||
```shell
|
||||
$ ghe-migrator import /home/admin/<em>MIGRATION_GUID</em>.tar.gz -g <em>MIGRATION_GUID</em> -u <em>username</em> -p <em>TOKEN</em>
|
||||
$ ghe-migrator import /home/admin/MIGRATION-GUID.tar.gz -g MIGRATION-GUID -u USERNAME -p TOKEN
|
||||
|
||||
> Starting GitHub::Migrator
|
||||
> Import 100% complete /
|
||||
@@ -95,19 +95,19 @@ The record types match those found in the [migrated data](/enterprise/admin/guid
|
||||
With the `ghe-migrator audit` command, you can filter based on the record type using the `-m` flag. Similarly, you can filter on the import state using the `-s` flag. The command looks like this:
|
||||
|
||||
```shell
|
||||
$ ghe-migrator audit -m <em>RECORD_TYPE</em> -s <em>STATE</em> -g <em>MIGRATION_GUID</em>
|
||||
$ ghe-migrator audit -m RECORD_TYPE -s STATE -g MIGRATION-GUID
|
||||
```
|
||||
|
||||
For example, to view every successfully imported organization and team, you would enter:
|
||||
```shell
|
||||
$ ghe-migrator audit -m organization,team -s mapped,renamed -g <em>MIGRATION_GUID</em>
|
||||
$ ghe-migrator audit -m organization,team -s mapped,renamed -g MIGRATION-GUID
|
||||
> model_name,source_url,target_url,state
|
||||
> organization,https://gh.source/octo-org/,https://ghe.target/octo-org/,renamed
|
||||
```
|
||||
|
||||
**We strongly recommend auditing every import that failed.** To do that, you will enter:
|
||||
```shell
|
||||
$ ghe-migrator audit -s failed_import,failed_map,failed_rename,failed_merge -g <em>MIGRATION_GUID</em>
|
||||
$ ghe-migrator audit -s failed_import,failed_map,failed_rename,failed_merge -g MIGRATION-GUID
|
||||
> model_name,source_url,target_url,state
|
||||
> user,https://gh.source/octocat,https://gh.target/octocat,failed
|
||||
> repository,https://gh.source/octo-org/octo-project,https://ghe.target/octo-org/octo-project,failed
|
||||
@@ -132,18 +132,19 @@ To unlock the repositories on a {% data variables.product.prodname_dotcom_the_we
|
||||
* Your access token for authentication
|
||||
* The unique `id` of the migration
|
||||
* The name of the repository to unlock
|
||||
|
||||
```shell
|
||||
curl -H "Authorization: Bearer <em>GITHUB_ACCESS_TOKEN</em>" -X DELETE \
|
||||
curl -H "Authorization: Bearer GITHUB_ACCESS_TOKEN" -X DELETE \
|
||||
-H "Accept: application/vnd.github.wyandotte-preview+json" \
|
||||
https://api.github.com/orgs/<em>orgname</em>/migrations/<em>id</em>/repos/<em>repo_name</em>/lock
|
||||
https://api.github.com/orgs/ORG-NAME/migrations/ID/repos/REPO_NAME/lock
|
||||
```
|
||||
|
||||
### Deleting repositories from an organization on {% data variables.product.prodname_dotcom_the_website %}
|
||||
|
||||
After unlocking the {% data variables.product.prodname_dotcom_the_website %} organization's repositories, you should delete every repository you previously migrated using [the repository delete endpoint](/rest/repos/#delete-a-repository). You'll need your access token for authentication:
|
||||
```shell
|
||||
curl -H "Authorization: Bearer <em>GITHUB_ACCESS_TOKEN</em>" -X DELETE \
|
||||
https://api.github.com/repos/<em>orgname</em>/<em>repo_name</em>
|
||||
curl -H "Authorization: Bearer GITHUB_ACCESS_TOKEN" -X DELETE \
|
||||
https://api.github.com/repos/ORG-NAME/REPO_NAME
|
||||
```
|
||||
|
||||
### Unlocking repositories from a {% data variables.product.prodname_ghe_server %} instance
|
||||
|
||||
@@ -22,7 +22,7 @@ shortTitle: Prepare to migrate data
|
||||
1. Using the [`scp`](https://acloudguru.com/blog/engineering/ssh-and-scp-howto-tips-tricks#scp) command, copy the migration archive generated from your source instance or organization to your {% data variables.product.prodname_ghe_server %} target:
|
||||
|
||||
```shell
|
||||
$ scp -P 122 <em>/path/to/archive/MIGRATION_GUID.tar.gz</em> admin@<em>hostname</em>:/home/admin/
|
||||
$ scp -P 122 PATH-TO-MIGRATION-GUID.tar.gz admin@HOSTNAME:/home/admin/
|
||||
```
|
||||
|
||||
{% data reusables.enterprise_installation.ssh-into-target-instance %}
|
||||
@@ -30,7 +30,7 @@ shortTitle: Prepare to migrate data
|
||||
3. Use the `ghe-migrator prepare` command to prepare the archive for import on the target instance and generate a new Migration GUID for you to use in subsequent steps:
|
||||
|
||||
```shell
|
||||
ghe-migrator prepare /home/admin/<em>MIGRATION_GUID</em>.tar.gz
|
||||
ghe-migrator prepare /home/admin/MIGRATION-GUID.tar.gz
|
||||
```
|
||||
|
||||
* To start a new import attempt, run `ghe-migrator prepare` again and get a new Migration GUID.
|
||||
@@ -40,12 +40,12 @@ shortTitle: Prepare to migrate data
|
||||
|
||||
1. Using the `ghe-migrator conflicts` command with the Migration GUID, generate a *conflicts.csv* file:
|
||||
```shell
|
||||
$ ghe-migrator conflicts -g <em>MIGRATION_GUID</em> > conflicts.csv
|
||||
$ ghe-migrator conflicts -g MIGRATION-GUID > conflicts.csv
|
||||
```
|
||||
- If no conflicts are reported, you can safely import the data by following the steps in "[Migrating data to your enterprise](/enterprise/admin/guides/migrations/applying-the-imported-data-on-github-enterprise-server/)".
|
||||
2. If there are conflicts, using the [`scp`](https://acloudguru.com/blog/engineering/ssh-and-scp-howto-tips-tricks#scp) command, copy *conflicts.csv* to your local computer:
|
||||
```shell
|
||||
$ scp -P 122 admin@<em>hostname</em>:conflicts.csv ~/Desktop
|
||||
$ scp -P 122 admin@HOSTNAME:conflicts.csv ~/Desktop
|
||||
```
|
||||
3. Continue to "[Resolving migration conflicts or setting up custom mappings](#resolving-migration-conflicts-or-setting-up-custom-mappings)".
|
||||
|
||||
@@ -118,7 +118,7 @@ Given a list of usernames from the source and a list of usernames on the target,
|
||||
You can quickly generate a CSV of users being migrated in the CSV format needed to apply custom mappings by using the [`ghe-migrator audit`](/enterprise/admin/guides/migrations/reviewing-migration-data) command:
|
||||
|
||||
```shell
|
||||
$ ghe-migrator audit -m user -g <em>MIGRATION_GUID</em> > users.csv
|
||||
$ ghe-migrator audit -m user -g MIGRATION-GUID > users.csv
|
||||
```
|
||||
|
||||
Now, you can edit that CSV and enter the new URL for each user you would like to map or rename, and then update the fourth column to have `map` or `rename` as appropriate.
|
||||
@@ -136,13 +136,13 @@ The same process can be used to create mappings for each record that supports cu
|
||||
1. After making changes, use the [`scp`](https://acloudguru.com/blog/engineering/ssh-and-scp-howto-tips-tricks#scp) command to apply your modified *conflicts.csv* (or any other mapping *.csv* file in the correct format) to the target instance:
|
||||
|
||||
```shell
|
||||
$ scp -P 122 ~/Desktop/conflicts.csv admin@<em>hostname</em>:/home/admin/
|
||||
$ scp -P 122 ~/Desktop/conflicts.csv admin@HOSTNAME:/home/admin/
|
||||
```
|
||||
|
||||
2. Re-map the migration data using the `ghe-migrator map` command, passing in the path to your modified *.csv* file and the Migration GUID:
|
||||
|
||||
```shell
|
||||
$ ghe-migrator map -i conflicts.csv -g <em>MIGRATION_GUID</em>
|
||||
$ ghe-migrator map -i conflicts.csv -g MIGRATION-GUID
|
||||
```
|
||||
|
||||
3. If the `ghe-migrator map -i conflicts.csv -g MIGRATION_GUID` command reports that conflicts still exist, run through the migration conflict resolution process again.
|
||||
3. If the `ghe-migrator map -i conflicts.csv -g MIGRATION-GUID` command reports that conflicts still exist, run through the migration conflict resolution process again.
|
||||
|
||||
@@ -74,13 +74,13 @@ Before you can use the {% data variables.product.prodname_cli %} to add an SSH k
|
||||
To add an SSH authentication key to your GitHub account, use the `ssh-key add` subcommand, specifying your public key.
|
||||
|
||||
```shell
|
||||
gh ssh-key add <em>key-file</em>
|
||||
gh ssh-key add KEY-FILE
|
||||
```
|
||||
|
||||
To include a title for the new key, use the `-t` or `--title` flag.
|
||||
|
||||
```shell
|
||||
gh ssh-key add <em>key-file</em> --title "personal laptop"
|
||||
gh ssh-key add KEY-FILE --title "personal laptop"
|
||||
```
|
||||
|
||||
If you generated your SSH key by following the instructions in "[Generating a new SSH key](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)", you can add the key to your account with this command.
|
||||
|
||||
@@ -44,17 +44,19 @@ If you are a site administrator for {% data variables.product.product_location %
|
||||
{%- ifversion ghae %}
|
||||
<!-- GitHub AE is FIPS 140-2 compliant. FIPS does not yet permit keys that use the ed25519 algorithm. -->
|
||||
```shell
|
||||
$ ssh-keygen -t rsa -b 4096 -C "<em>your_email@example.com</em>"
|
||||
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
|
||||
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
|
||||
|
||||
```
|
||||
{%- else %}
|
||||
```shell
|
||||
$ ssh-keygen -t ed25519 -C "<em>your_email@example.com</em>"
|
||||
$ ssh-keygen -t ed25519 -C "your_email@example.com"
|
||||
```
|
||||
{% note %}
|
||||
|
||||
**Note:** If you are using a legacy system that doesn't support the Ed25519 algorithm, use:
|
||||
```shell
|
||||
$ ssh-keygen -t rsa -b 4096 -C "<em>your_email@example.com</em>"
|
||||
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
|
||||
```
|
||||
|
||||
{% endnote %}
|
||||
@@ -62,14 +64,14 @@ If you are a site administrator for {% data variables.product.product_location %
|
||||
|
||||
This creates a new SSH key, using the provided email as a label.
|
||||
```shell
|
||||
> Generating public/private <em>algorithm</em> key pair.
|
||||
> Generating public/private ALGORITHM key pair.
|
||||
```
|
||||
3. When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.
|
||||
|
||||
{% mac %}
|
||||
|
||||
```shell
|
||||
> Enter a file in which to save the key (/Users/<em>you</em>/.ssh/id_<em>algorithm</em>): <em>[Press enter]</em>
|
||||
> Enter a file in which to save the key (/Users/YOU/.ssh/id_ALGORITHM: [Press enter]
|
||||
```
|
||||
|
||||
{% endmac %}
|
||||
@@ -77,7 +79,7 @@ If you are a site administrator for {% data variables.product.product_location %
|
||||
{% windows %}
|
||||
|
||||
```shell
|
||||
> Enter a file in which to save the key (/c/Users/<em>you</em>/.ssh/id_<em>algorithm</em>):<em>[Press enter]</em>
|
||||
> Enter a file in which to save the key (/c/Users/YOU/.ssh/id_ALGORITHM):[Press enter]
|
||||
```
|
||||
|
||||
{% endwindows %}
|
||||
@@ -85,15 +87,15 @@ If you are a site administrator for {% data variables.product.product_location %
|
||||
{% linux %}
|
||||
|
||||
```shell
|
||||
> Enter a file in which to save the key (/home/<em>you</em>/.ssh/<em>algorithm</em>): <em>[Press enter]</em>
|
||||
> Enter a file in which to save the key (/home/YOU/.ssh/ALGORITHM):[Press enter]
|
||||
```
|
||||
|
||||
{% endlinux %}
|
||||
|
||||
4. At the prompt, type a secure passphrase. For more information, see ["Working with SSH key passphrases](/articles/working-with-ssh-key-passphrases)."
|
||||
```shell
|
||||
> Enter passphrase (empty for no passphrase): <em>[Type a passphrase]</em>
|
||||
> Enter same passphrase again: <em>[Type passphrase again]</em>
|
||||
> Enter passphrase (empty for no passphrase): [Type a passphrase]
|
||||
> Enter same passphrase again: [Type passphrase again]
|
||||
```
|
||||
|
||||
## Adding your SSH key to the ssh-agent
|
||||
@@ -110,7 +112,7 @@ Before adding a new SSH key to the ssh-agent to manage your keys, you should hav
|
||||
|
||||
```shell
|
||||
$ open ~/.ssh/config
|
||||
> The file /Users/<em>you</em>/.ssh/config does not exist.
|
||||
> The file /Users/YOU/.ssh/config does not exist.
|
||||
```
|
||||
|
||||
* If the file doesn't exist, create the file.
|
||||
@@ -198,7 +200,7 @@ If you are using macOS or Linux, you may need to update your SSH client or insta
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
3. Paste the text below, substituting in the email address for your account on {% data variables.product.product_name %}.
|
||||
```shell
|
||||
$ ssh-keygen -t {% ifversion ghae %}ecdsa{% else %}ed25519{% endif %}-sk -C "<em>your_email@example.com</em>"
|
||||
$ ssh-keygen -t {% ifversion ghae %}ecdsa{% else %}ed25519{% endif %}-sk -C "YOUR_EMAIL"
|
||||
```
|
||||
|
||||
{%- ifversion not ghae %}
|
||||
@@ -217,7 +219,7 @@ If you are using macOS or Linux, you may need to update your SSH client or insta
|
||||
{% mac %}
|
||||
|
||||
```shell
|
||||
> Enter a file in which to save the key (/Users/<em>you</em>/.ssh/id_{% ifversion ghae %}ecdsa{% else %}ed25519{% endif %}_sk): <em>[Press enter]</em>
|
||||
> Enter a file in which to save the key (/Users/YOU/.ssh/id_{% ifversion ghae %}ecdsa{% else %}ed25519{% endif %}_sk): [Press enter]
|
||||
```
|
||||
|
||||
{% endmac %}
|
||||
@@ -225,7 +227,7 @@ If you are using macOS or Linux, you may need to update your SSH client or insta
|
||||
{% windows %}
|
||||
|
||||
```shell
|
||||
> Enter a file in which to save the key (/c/Users/<em>you</em>/.ssh/id_{% ifversion ghae %}ecdsa{% else %}ed25519{% endif %}_sk):<em>[Press enter]</em>
|
||||
> Enter a file in which to save the key (/c/Users/YOU/.ssh/id_{% ifversion ghae %}ecdsa{% else %}ed25519{% endif %}_sk):[Press enter]
|
||||
```
|
||||
|
||||
{% endwindows %}
|
||||
@@ -233,14 +235,14 @@ If you are using macOS or Linux, you may need to update your SSH client or insta
|
||||
{% linux %}
|
||||
|
||||
```shell
|
||||
> Enter a file in which to save the key (/home/<em>you</em>/.ssh/id_{% ifversion ghae %}ecdsa{% else %}ed25519{% endif %}_sk): <em>[Press enter]</em>
|
||||
> Enter a file in which to save the key (/home/YOU/.ssh/id_{% ifversion ghae %}ecdsa{% else %}ed25519{% endif %}_sk):[Press enter]
|
||||
```
|
||||
|
||||
{% endlinux %}
|
||||
|
||||
6. When you are prompted to type a passphrase, press **Enter**.
|
||||
```shell
|
||||
> Enter passphrase (empty for no passphrase): <em>[Type a passphrase]</em>
|
||||
> Enter same passphrase again: <em>[Type passphrase again]</em>
|
||||
> Enter passphrase (empty for no passphrase): [Type a passphrase]
|
||||
> Enter same passphrase again: [Type passphrase again]
|
||||
```
|
||||
7. Add the SSH key to your account on {% data variables.product.prodname_dotcom %}. For more information, see "[Adding a new SSH key to your {% data variables.product.prodname_dotcom %} account](/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account)."
|
||||
|
||||
@@ -38,7 +38,7 @@ When you test your connection, you'll need to authenticate this action using you
|
||||
|
||||
3. Verify that the fingerprint in the message you see matches {% ifversion fpt or ghec %}[{% data variables.product.prodname_dotcom %}'s public key fingerprint](/github/authenticating-to-github/githubs-ssh-key-fingerprints){% else %} your enterprise's public key fingerprint{% endif %}. If it does, then type `yes`:
|
||||
```shell
|
||||
> Hi <em>username</em>! You've successfully authenticated, but GitHub does not
|
||||
> Hi USERNAME! You've successfully authenticated, but GitHub does not
|
||||
> provide shell access.
|
||||
```
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@ You can change the passphrase for an existing private key without regenerating t
|
||||
|
||||
```shell
|
||||
$ ssh-keygen -p -f ~/.ssh/id_{% ifversion ghae %}rsa{% else %}ed25519{% endif %}
|
||||
> Enter old passphrase: <em>[Type old passphrase]</em>
|
||||
> Key has comment '<em>your_email@example.com</em>'
|
||||
> Enter new passphrase (empty for no passphrase): <em>[Type new passphrase]</em>
|
||||
> Enter same passphrase again: <em>[Repeat the new passphrase]</em>
|
||||
> Enter old passphrase: [Type old passphrase]
|
||||
> Key has comment 'your_email@example.com'
|
||||
> Enter new passphrase (empty for no passphrase): [Type new passphrase]
|
||||
> Enter same passphrase again: [Repeat the new passphrase]
|
||||
> Your identification has been saved with the new passphrase.
|
||||
```
|
||||
|
||||
@@ -79,9 +79,9 @@ Now, when you first run Git Bash, you are prompted for your passphrase:
|
||||
```shell
|
||||
> Initializing new SSH agent...
|
||||
> succeeded
|
||||
> Enter passphrase for /c/Users/<em>you</em>/.ssh/id_rsa:
|
||||
> Identity added: /c/Users/<em>you</em>/.ssh/id_rsa (/c/Users/<em>you</em>/.ssh/id_rsa)
|
||||
> Welcome to Git (version <em>1.6.0.2-preview20080923</em>)
|
||||
> Enter passphrase for /c/Users/YOU/.ssh/id_rsa:
|
||||
> Identity added: /c/Users/YOU/.ssh/id_rsa (/c/Users/YOU/.ssh/id_rsa)
|
||||
> Welcome to Git (version 1.6.0.2-preview20080923)
|
||||
>
|
||||
> Run 'git help git' to display the help index.
|
||||
> Run 'git help <command>' to display help for specific commands.
|
||||
|
||||
@@ -45,7 +45,7 @@ The [BFG Repo-Cleaner](https://rtyley.github.io/bfg-repo-cleaner/) is a tool tha
|
||||
For example, to remove your file with sensitive data and leave your latest commit untouched, run:
|
||||
|
||||
```shell
|
||||
$ bfg --delete-files <em>YOUR-FILE-WITH-SENSITIVE-DATA</em>
|
||||
$ bfg --delete-files YOUR-FILE-WITH-SENSITIVE-DATA
|
||||
```
|
||||
|
||||
To replace all text listed in `passwords.txt` wherever it can be found in your repository's history, run:
|
||||
@@ -80,8 +80,8 @@ To illustrate how `git filter-repo` works, we'll show you how to remove your fil
|
||||
|
||||
2. If you don't already have a local copy of your repository with sensitive data in its history, [clone the repository](/articles/cloning-a-repository/) to your local computer.
|
||||
```shell
|
||||
$ git clone https://{% data variables.command_line.codeblock %}/<em>YOUR-USERNAME</em>/<em>YOUR-REPOSITORY</em>
|
||||
> Initialized empty Git repository in /Users/<em>YOUR-FILE-PATH</em>/<em>YOUR-REPOSITORY</em>/.git/
|
||||
$ git clone https://{% data variables.command_line.codeblock %}/YOUR-USERNAME/YOUR-REPOSITORY
|
||||
> Initialized empty Git repository in /Users/YOUR-FILE-PATH/YOUR-REPOSITORY/.git/
|
||||
> remote: Counting objects: 1301, done.
|
||||
> remote: Compressing objects: 100% (769/769), done.
|
||||
> remote: Total 1301 (delta 724), reused 910 (delta 522)
|
||||
@@ -90,7 +90,7 @@ To illustrate how `git filter-repo` works, we'll show you how to remove your fil
|
||||
```
|
||||
3. Navigate into the repository's working directory.
|
||||
```shell
|
||||
$ cd <em>YOUR-REPOSITORY</em>
|
||||
$ cd YOUR-REPOSITORY
|
||||
```
|
||||
4. Run the following command, replacing `PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA` with the **path to the file you want to remove, not just its filename**. These arguments will:
|
||||
- Force Git to process, but not check out, the entire history of every branch and tag
|
||||
@@ -121,10 +121,10 @@ To illustrate how `git filter-repo` works, we'll show you how to remove your fil
|
||||
5. Add your file with sensitive data to `.gitignore` to ensure that you don't accidentally commit it again.
|
||||
|
||||
```shell
|
||||
$ echo "<em>YOUR-FILE-WITH-SENSITIVE-DATA</em>" >> .gitignore
|
||||
$ echo "YOUR-FILE-WITH-SENSITIVE-DATA" >> .gitignore
|
||||
$ git add .gitignore
|
||||
$ git commit -m "Add <em>YOUR-FILE-WITH-SENSITIVE-DATA</em> to .gitignore"
|
||||
> [main 051452f] Add <em>YOUR-FILE-WITH-SENSITIVE-DATA</em> to .gitignore
|
||||
$ git commit -m "Add YOUR-FILE-WITH-SENSITIVE-DATA to .gitignore"
|
||||
> [main 051452f] Add YOUR-FILE-WITH-SENSITIVE-DATA to .gitignore
|
||||
> 1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
```
|
||||
6. Double-check that you've removed everything you wanted to from your repository's history, and that all of your branches are checked out.
|
||||
@@ -136,7 +136,7 @@ To illustrate how `git filter-repo` works, we'll show you how to remove your fil
|
||||
> Compressing objects: 100% (677/677), done.
|
||||
> Writing objects: 100% (1058/1058), 148.85 KiB, done.
|
||||
> Total 1058 (delta 590), reused 602 (delta 378)
|
||||
> To https://{% data variables.command_line.codeblock %}/<em>YOUR-USERNAME</em>/<em>YOUR-REPOSITORY</em>.git
|
||||
> To https://{% data variables.command_line.codeblock %}/YOUR-USERNAME.YOUR-REPOSITORY.git
|
||||
> + 48dc599...051452f main -> main (forced update)
|
||||
```
|
||||
8. In order to remove the sensitive file from [your tagged releases](/articles/about-releases), you'll also need to force-push against your Git tags:
|
||||
@@ -147,7 +147,7 @@ To illustrate how `git filter-repo` works, we'll show you how to remove your fil
|
||||
> Compressing objects: 100% (166/166), done.
|
||||
> Writing objects: 100% (321/321), 331.74 KiB | 0 bytes/s, done.
|
||||
> Total 321 (delta 124), reused 269 (delta 108)
|
||||
> To https://{% data variables.command_line.codeblock %}/<em>YOUR-USERNAME</em>/<em>YOUR-REPOSITORY</em>.git
|
||||
> To https://{% data variables.command_line.codeblock %}/YOUR-USERNAME/YOUR-REPOSITORY.git
|
||||
> + 48dc599...051452f main -> main (forced update)
|
||||
```
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ You can delete unauthorized (or possibly compromised) SSH keys to ensure that an
|
||||
6. Find and take a note of your public key fingerprint.
|
||||
```shell
|
||||
$ ssh-add -l -E sha256
|
||||
> 2048 <em>SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ</em> /Users/<em>USERNAME</em>/.ssh/id_rsa (RSA)
|
||||
> 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA)
|
||||
```
|
||||
|
||||
7. The SSH keys on {% data variables.product.product_name %} *should* match the same keys on your computer.
|
||||
@@ -67,7 +67,7 @@ You can delete unauthorized (or possibly compromised) SSH keys to ensure that an
|
||||
6. Find and take a note of your public key fingerprint.
|
||||
```shell
|
||||
$ ssh-add -l -E sha256
|
||||
> 2048 <em>SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ</em> /Users/<em>USERNAME</em>/.ssh/id_rsa (RSA)
|
||||
> 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA)
|
||||
```
|
||||
|
||||
7. The SSH keys on {% data variables.product.product_name %} *should* match the same keys on your computer.
|
||||
@@ -94,7 +94,7 @@ You can delete unauthorized (or possibly compromised) SSH keys to ensure that an
|
||||
6. Find and take a note of your public key fingerprint.
|
||||
```shell
|
||||
$ ssh-add -l -E sha256
|
||||
> 2048 <em>SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ</em> /Users/<em>USERNAME</em>/.ssh/id_rsa (RSA)
|
||||
> 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA)
|
||||
```
|
||||
|
||||
7. The SSH keys on {% data variables.product.product_name %} *should* match the same keys on your computer.
|
||||
|
||||
@@ -26,7 +26,7 @@ If you're using a GPG key that matches your committer identity and your verified
|
||||
{% data reusables.gpg.copy-gpg-key-id %}
|
||||
4. Enter `gpg --edit-key GPG key ID`, substituting in the GPG key ID you'd like to use. In the following example, the GPG key ID is `3AA5C34371567BD2`:
|
||||
```shell
|
||||
$ gpg --edit-key <em>3AA5C34371567BD2</em>
|
||||
$ gpg --edit-key 3AA5C34371567BD2
|
||||
```
|
||||
5. Enter `gpg> adduid` to add the user ID details.
|
||||
```shell
|
||||
@@ -34,9 +34,9 @@ If you're using a GPG key that matches your committer identity and your verified
|
||||
```
|
||||
6. Follow the prompts to supply your real name, email address, and any comments. You can modify your entries by choosing `N`, `C`, or `E`. {% data reusables.gpg.private-email %} {% ifversion fpt or ghec %} For more information, see "[Setting your commit email address](/articles/setting-your-commit-email-address)."{% endif %}
|
||||
```shell
|
||||
Real Name: <em>Octocat</em>
|
||||
Email address: <em>octocat@github.com</em>
|
||||
Comment: <em>GitHub key</em>
|
||||
Real Name: OCTOCAT
|
||||
Email address: "octocat@github.com"
|
||||
Comment: GITHUB-KEY
|
||||
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit?
|
||||
```
|
||||
7. Enter `O` to confirm your selections.
|
||||
@@ -47,7 +47,7 @@ If you're using a GPG key that matches your committer identity and your verified
|
||||
```
|
||||
10. Enter `gpg --armor --export GPG key ID`, substituting in the GPG key ID you'd like to use. In the following example, the GPG key ID is `3AA5C34371567BD2`:
|
||||
```shell
|
||||
$ gpg --armor --export <em>3AA5C34371567BD2</em>
|
||||
$ gpg --armor --export 3AA5C34371567BD2
|
||||
# Prints the GPG key, in ASCII armor format
|
||||
```
|
||||
11. Upload the GPG key by [adding it to your GitHub account](/articles/adding-a-gpg-key-to-your-github-account).
|
||||
|
||||
@@ -29,7 +29,7 @@ shortTitle: Existing GPG keys
|
||||
* If there are no GPG key pairs or you don't want to use any that are available for signing commits and tags, then [generate a new GPG key](/articles/generating-a-new-gpg-key).
|
||||
* If there's an existing GPG key pair and you want to use it to sign commits and tags, you can display the public key using the following command, substituting in the GPG key ID you'd like to use. In this example, the GPG key ID is `3AA5C34371567BD2`:
|
||||
```shell
|
||||
$ gpg --armor --export <em>3AA5C34371567BD2</em>
|
||||
$ gpg --armor --export 3AA5C34371567BD2
|
||||
# Prints the GPG key ID, in ASCII armor format
|
||||
```
|
||||
You can then [add your GPG key to your GitHub account](/articles/adding-a-gpg-key-to-your-github-account).
|
||||
|
||||
@@ -36,7 +36,7 @@ If you have multiple keys or are attempting to sign commits or tags with a key t
|
||||
|
||||
1. When committing changes in your local branch, add the -S flag to the git commit command:
|
||||
```shell
|
||||
$ git commit -S -m <em>"your commit message"</em>
|
||||
$ git commit -S -m "YOUR_COMMIT_MESSAGE"
|
||||
# Creates a signed commit
|
||||
```
|
||||
2. If you're using GPG, after you create your commit, provide the passphrase you set up when you [generated your GPG key](/articles/generating-a-new-gpg-key).
|
||||
|
||||
@@ -19,12 +19,12 @@ topics:
|
||||
|
||||
1. To sign a tag, add `-s` to your `git tag` command.
|
||||
```shell
|
||||
$ git tag -s <em>mytag</em>
|
||||
$ git tag -s MYTAG
|
||||
# Creates a signed tag
|
||||
```
|
||||
2. Verify your signed tag by running `git tag -v [tag-name]`.
|
||||
```shell
|
||||
$ git tag -v <em>mytag</em>
|
||||
$ git tag -v MYTAG
|
||||
# Verifies the signed tag
|
||||
```
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ You should be able to fix this error by loading your keys into your SSH agent wi
|
||||
$ eval "$(ssh-agent -s)"
|
||||
> Agent pid 59566
|
||||
$ ssh-add
|
||||
> Enter passphrase for /home/<em>you</em>/.ssh/id_rsa: <em>[tippy tap]</em>
|
||||
> Identity added: /home/<em>you</em>/.ssh/id_rsa (/home/<em>you</em>/.ssh/id_rsa)
|
||||
> Enter passphrase for /home/YOU/.ssh/id_rsa: [tippy tap]
|
||||
> Identity added: /home/YOU/.ssh/id_rsa (/home/YOU/.ssh/id_rsa)
|
||||
```
|
||||
|
||||
If your key does not have the default filename (`/.ssh/id_rsa`), you'll have to pass that path to `ssh-add`:
|
||||
@@ -47,6 +47,6 @@ If your key does not have the default filename (`/.ssh/id_rsa`), you'll have to
|
||||
$ eval "$(ssh-agent -s)"
|
||||
> Agent pid 59566
|
||||
$ ssh-add ~/.ssh/my_other_key
|
||||
> Enter passphrase for /home/<em>you</em>/.ssh/my_other_key: <em>[tappity tap tap]</em>
|
||||
> Identity added: /home/<em>you</em>/.ssh/my_other_key (/home/<em>you</em>/.ssh/my_other_key)
|
||||
> Enter passphrase for /home/YOU/.ssh/my_other_key: [tappity tap tap]
|
||||
> Identity added: /home/YOU/.ssh/my_other_key (/home/YOU/.ssh/my_other_key)
|
||||
```
|
||||
|
||||
@@ -31,7 +31,7 @@ $ ssh -vT git@{% data variables.command_line.codeblock %}
|
||||
Often, the simplest solution is to simply avoid SSH entirely. Most firewalls and proxies allow HTTPS traffic without issue. To take advantage of this, change [the remote URL](/github/getting-started-with-github/about-remote-repositories) you're using:
|
||||
|
||||
```shell
|
||||
$ git clone https://{% data variables.command_line.codeblock %}/<em>username</em>/<em>reponame</em>.git
|
||||
$ git clone https://{% data variables.command_line.codeblock %}/USERNAME/REPO-NAME.git
|
||||
> Cloning into 'reponame'...
|
||||
> remote: Counting objects: 84, done.
|
||||
> remote: Compressing objects: 100% (45/45), done.
|
||||
|
||||
@@ -18,9 +18,9 @@ topics:
|
||||
To determine where the key has already been used, open a terminal and type the `ssh` command. Use the `-i` flag to provide the path to the key you want to check:
|
||||
|
||||
```shell
|
||||
$ ssh -T -ai <em>~/.ssh/id_rsa</em> git@{% data variables.command_line.codeblock %}
|
||||
$ ssh -T -ai ~/.ssh/id_rsa git@{% data variables.command_line.codeblock %}
|
||||
# Connect to {% data variables.product.product_location %} using a specific ssh key
|
||||
> Hi <em>username</em>! You've successfully authenticated, but GitHub does not
|
||||
> Hi USERNAME! You've successfully authenticated, but GitHub does not
|
||||
> provide shell access.
|
||||
```
|
||||
|
||||
@@ -30,7 +30,7 @@ The *username* in the response is the account on {% ifversion ghae %}{% data var
|
||||
To force SSH to use only the key provided on the command line, use `-o` to add the `IdentitiesOnly=yes` option:
|
||||
|
||||
```shell
|
||||
$ ssh -v -o "IdentitiesOnly=yes" -i <em>~/.ssh/id_rsa</em> git@{% data variables.command_line.codeblock %}
|
||||
$ ssh -v -o "IdentitiesOnly=yes" -i ~/.ssh/id_rsa git@{% data variables.command_line.codeblock %}
|
||||
```
|
||||
|
||||
## Fixing the issue
|
||||
|
||||
@@ -27,7 +27,7 @@ To make sure you are connecting to the right domain, you can enter the following
|
||||
```shell
|
||||
$ ssh -vT git@{% data variables.command_line.codeblock %}
|
||||
> OpenSSH_8.1p1, LibreSSL 2.7.3
|
||||
> debug1: Reading configuration data /Users/<em>you</em>/.ssh/config
|
||||
> debug1: Reading configuration data /Users/YOU/.ssh/config
|
||||
> debug1: Reading configuration data /etc/ssh/ssh_config
|
||||
> debug1: /etc/ssh/ssh_config line 47: Applying options for *
|
||||
> debug1: Connecting to {% data variables.command_line.codeblock %} port 22.
|
||||
@@ -40,7 +40,7 @@ The connection should be made on port 22{% ifversion fpt or ghec %}, unless you'
|
||||
All connections, including those for remote URLs, must be made as the "git" user. If you try to connect with your {% data variables.product.product_name %} username, it will fail:
|
||||
|
||||
```shell
|
||||
$ ssh -T <em>GITHUB-USERNAME</em>@{% data variables.command_line.codeblock %}
|
||||
$ ssh -T GITHUB-USERNAME@{% data variables.command_line.codeblock %}
|
||||
> Permission denied (publickey).
|
||||
```
|
||||
If your connection failed and you're using a remote URL with your {% data variables.product.product_name %} username, you can [change the remote URL to use the "git" user](/github/getting-started-with-github/managing-remote-repositories).
|
||||
@@ -49,7 +49,7 @@ You should verify your connection by typing:
|
||||
|
||||
```shell
|
||||
$ ssh -T git@{% data variables.command_line.codeblock %}
|
||||
> Hi <em>username</em>! You've successfully authenticated...
|
||||
> Hi USERNAME! You've successfully authenticated...
|
||||
```
|
||||
|
||||
## Make sure you have a key that is being used
|
||||
@@ -63,7 +63,7 @@ $ ssh -T git@{% data variables.command_line.codeblock %}
|
||||
$ eval "$(ssh-agent -s)"
|
||||
> Agent pid 59566
|
||||
$ ssh-add -l -E sha256
|
||||
> 2048 <em>SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ</em> /Users/<em>USERNAME</em>/.ssh/id_rsa (RSA)
|
||||
> 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA)
|
||||
```
|
||||
|
||||
{% endmac %}
|
||||
@@ -78,7 +78,7 @@ $ ssh -T git@{% data variables.command_line.codeblock %}
|
||||
2. Verify that you have a private key generated and loaded into SSH.
|
||||
```shell
|
||||
$ ssh-add -l -E sha256
|
||||
> 2048 <em>SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ</em> /Users/<em>USERNAME</em>/.ssh/id_rsa (RSA)
|
||||
> 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA)
|
||||
```
|
||||
|
||||
{% endwindows %}
|
||||
@@ -110,15 +110,15 @@ You can also check that the key is being used by trying to connect to `git@{% da
|
||||
```shell
|
||||
$ ssh -vT git@{% data variables.command_line.codeblock %}
|
||||
> ...
|
||||
> debug1: identity file /Users/<em>you</em>/.ssh/id_rsa type -1
|
||||
> debug1: identity file /Users/<em>you</em>/.ssh/id_rsa-cert type -1
|
||||
> debug1: identity file /Users/<em>you</em>/.ssh/id_dsa type -1
|
||||
> debug1: identity file /Users/<em>you</em>/.ssh/id_dsa-cert type -1
|
||||
> debug1: identity file /Users/YOU/.ssh/id_rsa type -1
|
||||
> debug1: identity file /Users/YOU/.ssh/id_rsa-cert type -1
|
||||
> debug1: identity file /Users/YOU/.ssh/id_dsa type -1
|
||||
> debug1: identity file /Users/YOU/.ssh/id_dsa-cert type -1
|
||||
> ...
|
||||
> debug1: Authentications that can continue: publickey
|
||||
> debug1: Next authentication method: publickey
|
||||
> debug1: Trying private key: /Users/<em>you</em>/.ssh/id_rsa
|
||||
> debug1: Trying private key: /Users/<em>you</em>/.ssh/id_dsa
|
||||
> debug1: Trying private key: /Users/YOU/.ssh/id_rsa
|
||||
> debug1: Trying private key: /Users/YOU/.ssh/id_dsa
|
||||
> debug1: No more authentication methods to try.
|
||||
> Permission denied (publickey).
|
||||
```
|
||||
@@ -128,11 +128,11 @@ In that example, we did not have any keys for SSH to use. The "-1" at the end of
|
||||
```shell
|
||||
$ ssh -vT git@{% data variables.command_line.codeblock %}
|
||||
> ...
|
||||
> debug1: identity file /Users/<em>you</em>/.ssh/id_rsa type 1
|
||||
> debug1: identity file /Users/YOU/.ssh/id_rsa type 1
|
||||
> ...
|
||||
> debug1: Authentications that can continue: publickey
|
||||
> debug1: Next authentication method: publickey
|
||||
> debug1: Offering RSA public key: /Users/<em>you</em>/.ssh/id_rsa
|
||||
> debug1: Offering RSA public key: /Users/YOU/.ssh/id_rsa
|
||||
```
|
||||
|
||||
## Verify the public key is attached to your account
|
||||
@@ -150,7 +150,7 @@ You must provide your public key to {% data variables.product.product_name %} to
|
||||
3. Find and take a note of your public key fingerprint.
|
||||
```shell
|
||||
$ ssh-add -l -E sha256
|
||||
> 2048 <em>SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ</em> /Users/<em>USERNAME</em>/.ssh/id_rsa (RSA)
|
||||
> 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA)
|
||||
```
|
||||
|
||||
{% data reusables.user-settings.access_settings %}
|
||||
@@ -171,7 +171,7 @@ You must provide your public key to {% data variables.product.product_name %} to
|
||||
3. Find and take a note of your public key fingerprint.
|
||||
```shell
|
||||
$ ssh-add -l -E sha256
|
||||
> 2048 <em>SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ</em> /Users/<em>USERNAME</em>/.ssh/id_rsa (RSA)
|
||||
> 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA)
|
||||
```
|
||||
|
||||
{% data reusables.user-settings.access_settings %}
|
||||
@@ -192,13 +192,13 @@ You must provide your public key to {% data variables.product.product_name %} to
|
||||
3. Find and take a note of your public key fingerprint. If you're using OpenSSH 6.7 or older:
|
||||
```shell
|
||||
$ ssh-add -l
|
||||
> 2048 <em>a0:dd:42:3c:5a:9d:e4:2a:21:52:4e:78:07:6e:c8:4d</em> /Users/<em>USERNAME</em>/.ssh/id_rsa (RSA)
|
||||
> 2048 a0:dd:42:3c:5a:9d:e4:2a:21:52:4e:78:07:6e:c8:4d /Users/USERNAME/.ssh/id_rsa (RSA)
|
||||
```
|
||||
|
||||
If you're using OpenSSH 6.8 or newer:
|
||||
```shell
|
||||
$ ssh-add -l -E md5
|
||||
> 2048 <em>MD5:a0:dd:42:3c:5a:9d:e4:2a:21:52:4e:78:07:6e:c8:4d</em> /Users/<em>USERNAME</em>/.ssh/id_rsa (RSA)
|
||||
> 2048 MD5:a0:dd:42:3c:5a:9d:e4:2a:21:52:4e:78:07:6e:c8:4d /Users/USERNAME/.ssh/id_rsa (RSA)
|
||||
```
|
||||
|
||||
{% data reusables.user-settings.access_settings %}
|
||||
|
||||
@@ -22,7 +22,7 @@ To test if SSH over the HTTPS port is possible, run this SSH command:
|
||||
|
||||
```shell
|
||||
$ ssh -T -p 443 git@ssh.github.com
|
||||
> Hi <em>username</em>! You've successfully authenticated, but GitHub does not
|
||||
> Hi USERNAME! You've successfully authenticated, but GitHub does not
|
||||
> provide shell access.
|
||||
```
|
||||
|
||||
@@ -45,6 +45,6 @@ You can test that this works by connecting once more to {% data variables.produc
|
||||
|
||||
```shell
|
||||
$ ssh -T git@{% data variables.command_line.codeblock %}
|
||||
> Hi <em>username</em>! You've successfully authenticated, but GitHub does not
|
||||
> Hi USERNAME! You've successfully authenticated, but GitHub does not
|
||||
> provide shell access.
|
||||
```
|
||||
|
||||
@@ -60,7 +60,7 @@ For more information, see "[{% data variables.product.prodname_codeql_cli %}](ht
|
||||
|
||||
## Downloading the {% data variables.product.prodname_codeql_runner %}
|
||||
|
||||
You can download the {% data variables.product.prodname_codeql_runner %} from https://{% ifversion fpt or ghec %}github.com{% else %}<em>HOSTNAME</em>{% endif %}/github/codeql-action/releases. On some operating systems, you may need to change permissions for the downloaded file before you can run it.
|
||||
You can download the {% data variables.product.prodname_codeql_runner %} from https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/github/codeql-action/releases. On some operating systems, you may need to change permissions for the downloaded file before you can run it.
|
||||
|
||||
On Linux:
|
||||
|
||||
@@ -82,7 +82,7 @@ On Windows, the `codeql-runner-win.exe` file usually requires no change to permi
|
||||
Once you download the {% data variables.product.prodname_codeql_runner %} and verify that it can be executed, you should make the runner available to each CI server that you intend to use for {% data variables.product.prodname_code_scanning %}. For example, you might configure each server to copy the runner from a central, internal location. Alternatively, you could use the REST API to get the runner directly from {% data variables.product.prodname_dotcom %}, for example:
|
||||
|
||||
```shell
|
||||
wget https://{% ifversion fpt or ghec %}github.com{% else %}<em>HOSTNAME</em>{% endif %}/github/codeql-action/releases/latest/download/codeql-runner-linux
|
||||
wget https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/github/codeql-action/releases/latest/download/codeql-runner-linux
|
||||
chmod +x codeql-runner-linux
|
||||
```
|
||||
|
||||
@@ -93,7 +93,7 @@ In addition to this, each CI server also needs:
|
||||
|
||||
The options for providing access to the {% data variables.product.prodname_codeql %} bundle are:
|
||||
|
||||
1. Allow the CI servers access to https://{% ifversion fpt or ghec %}github.com{% else %}<em>HOSTNAME</em>{% endif %}/github/codeql-action so that the {% data variables.product.prodname_codeql_runner %} can download the bundle automatically.
|
||||
1. Allow the CI servers access to https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/github/codeql-action so that the {% data variables.product.prodname_codeql_runner %} can download the bundle automatically.
|
||||
1. Manually download/extract the bundle, store it with other central resources, and use the <nobr>`--codeql-path`</nobr> flag to specify the location of the bundle in calls to initialize the {% data variables.product.prodname_codeql_runner %}.
|
||||
|
||||
## Calling the {% data variables.product.prodname_codeql_runner %}
|
||||
|
||||
@@ -33,6 +33,12 @@ You must store this file in the `.github` directory of your repository. When you
|
||||
|
||||
Any options that also affect security updates are used the next time a security alert triggers a pull request for a security update. For more information, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** You cannot configure {% data variables.product.prodname_dependabot_alerts %} using the *dependabot.yml* file.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
The *dependabot.yml* file has two mandatory top-level keys: `version`, and `updates`. You can, optionally, include a top-level `registries` key{% ifversion ghes = 3.5 %} and/or a `enable-beta-ecosystems` key{% endif %}. The file must start with `version: 2`.
|
||||
|
||||
## Configuration options for the *dependabot.yml* file
|
||||
|
||||
@@ -116,7 +116,7 @@ For more information, see "[Managing security and analysis settings for your org
|
||||
|
||||
## Configuring {% data variables.product.prodname_code_scanning %}
|
||||
|
||||
{% data variables.product.prodname_code_scanning_capc %} is an {% data variables.product.prodname_advanced_security %} feature that scans code for security vulnerabilities and errors
|
||||
{% data variables.product.prodname_code_scanning_capc %} is an {% data variables.product.prodname_advanced_security %} feature that scans code for security vulnerabilities and errors.
|
||||
|
||||
{% ifversion fpt or ghec %}{% data variables.product.prodname_code_scanning_capc %} is available for all public repositories. Organizations that use {% data variables.product.prodname_ghe_cloud %} with {% data variables.product.prodname_advanced_security %} can additionally use {% data variables.product.prodname_code_scanning %} for private and internal repositories.{% else %}{% data variables.product.prodname_code_scanning_capc %} is available if your enterprise uses {% data variables.product.prodname_advanced_security %}.{% endif %}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ You are prompted to choose a repository. If codespaces for this repository are b
|
||||
Alternatively, you can use flags to specify some or all of the options:
|
||||
|
||||
```shell
|
||||
gh codespace create -r <em>owner</em>/<em>repo</em> -b <em>branch</em> --devcontainer-path <em>path</em> -m <em>machine-type</em>
|
||||
gh codespace create -r OWNER/REPO -b BRANCH --devcontainer-path PATH -m MACHINE-TYPE
|
||||
```
|
||||
|
||||
In this example, replace `owner/repo` with the repository identifier. Replace `branch` with the name of the branch, or the full SHA hash of the commit, that you want to be initially checked out in the codespace. If you use the `-r` flag without the `b` flag, the codespace is created from the default branch.
|
||||
|
||||
@@ -78,7 +78,7 @@ By default, {% data variables.product.prodname_github_codespaces %} forwards por
|
||||
To forward a port use the `gh codespace ports forward` subcommand. Replace `codespace-port:local-port` with the remote and local ports that you want to connect. After entering the command choose from the list of codespaces that's displayed.
|
||||
|
||||
```shell
|
||||
gh codespace ports forward <em>codespace-port</em>:<em>local-port</em>
|
||||
gh codespace ports forward CODESPACE-PORT:LOCAL-PORT
|
||||
```
|
||||
|
||||
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_ports_forward).
|
||||
@@ -132,7 +132,7 @@ To change the visibility of a forwarded port, use the `gh codespace ports visibi
|
||||
Replace `codespace-port` with the forwarded port number. Replace `setting` with `private`, `org`, or `public`. After entering the command choose from the list of codespaces that's displayed.
|
||||
|
||||
```shell
|
||||
gh codespace ports visibility <em>codespace-port</em>:<em>setting</em>
|
||||
gh codespace ports visibility CODESPACE-PORT:SETTINGS
|
||||
```
|
||||
|
||||
You can set the visibility for multiple ports with one command. For example:
|
||||
|
||||
@@ -50,7 +50,7 @@ Changing the display name of a codespace can be useful if you have multiple code
|
||||
To rename a codespace, use the `gh codespace edit` subcommand:
|
||||
|
||||
```shell
|
||||
gh codespace edit -c <em>permanent name of the codespace</em> -d <em>new display name</em>
|
||||
gh codespace edit -c PERMANENT-NAME-OF-CODESPACE -d NEW-DISPLAY-NAME
|
||||
```
|
||||
|
||||
In this example, replace `permanent name of the codespace` with the permanent name of the codespace. Replace `new display name` with the desired display name.
|
||||
@@ -62,7 +62,7 @@ For a complete reference of `gh` commands for {% data variables.product.prodname
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: The `-c <em>codespace-name</em>` flag, used with many commands, is optional. If you omit it a list of codespaces is displayed for you to choose from.
|
||||
**Note**: The `-c CODESPACE_NAME` flag, used with many commands, is optional. If you omit it a list of codespaces is displayed for you to choose from.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
@@ -77,7 +77,7 @@ The list includes the unique name of each codespace, which you can use in other
|
||||
### Create a new codespace
|
||||
|
||||
```shell
|
||||
gh codespace create -r <em>owner/repository</em> [-b <em>branch</em>]
|
||||
gh codespace create -r OWNER/REPO_NAME [-b BRANCH]
|
||||
```
|
||||
|
||||
For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace)."
|
||||
@@ -85,7 +85,7 @@ For more information, see "[Creating a codespace](/codespaces/developing-in-code
|
||||
### Stop a codespace
|
||||
|
||||
```shell
|
||||
gh codespace stop -c <em>codespace-name</em>
|
||||
gh codespace stop -c CODESPACE-NAME
|
||||
```
|
||||
|
||||
For more information, see "[Deep dive into {% data variables.product.prodname_github_codespaces %}](/codespaces/getting-started/deep-dive#closing-or-stopping-your-codespace)."
|
||||
@@ -93,7 +93,7 @@ For more information, see "[Deep dive into {% data variables.product.prodname_gi
|
||||
### Delete a codespace
|
||||
|
||||
```shell
|
||||
gh codespace delete -c <em>codespace-name</em>
|
||||
gh codespace delete -c CODESPACE-NAME
|
||||
```
|
||||
|
||||
For more information, see "[Deleting a codespace](/codespaces/developing-in-codespaces/deleting-a-codespace)."
|
||||
@@ -103,7 +103,7 @@ For more information, see "[Deleting a codespace](/codespaces/developing-in-code
|
||||
To run commands on the remote codespace machine, from your terminal, you can SSH into the codespace.
|
||||
|
||||
```shell
|
||||
gh codespace ssh -c <em>codespace-name</em>
|
||||
gh codespace ssh -c CODESPACE-NAME
|
||||
```
|
||||
|
||||
{% data variables.product.prodname_github_codespaces %} copies your GitHub SSH keys into the codespace on creation for a seamless authentication experience. You may be asked to enter the passphrase for your SSH key, after which you will get a command prompt from the remote codespace machine.
|
||||
@@ -113,7 +113,7 @@ If you don't have any SSH keys, follow the instructions in "[Generating a new SS
|
||||
### Open a codespace in {% data variables.product.prodname_vscode %}
|
||||
|
||||
```shell
|
||||
gh codespace code -c <em>codespace-name</em>
|
||||
gh codespace code -c CODESPACE-NAME
|
||||
```
|
||||
|
||||
For more information, see "[Using {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode %}](/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code)."
|
||||
@@ -121,13 +121,13 @@ For more information, see "[Using {% data variables.product.prodname_github_code
|
||||
### Open a codespace in JupyterLab
|
||||
|
||||
```shell
|
||||
gh codespace jupyter -c <em>codespace-name</em>
|
||||
gh codespace jupyter -c CODESPACE-NAME
|
||||
```
|
||||
|
||||
### Copy a file to/from a codespace
|
||||
|
||||
```shell
|
||||
gh codespace cp [-r] <em>source(s)</em> <em>destination</em>
|
||||
gh codespace cp [-r] SOURCE(S) DESTINATION
|
||||
```
|
||||
|
||||
Use the prefix `remote:` on a file or directory name to indicate that it's on the codespace. As with the UNIX `cp` command, the first argument specifies the source and the last specifies the destination. If the destination is a directory, you can specify multiple sources. Use the `-r` (recursive) flag if any of the sources is a directory.
|
||||
@@ -171,7 +171,7 @@ For more information about the `gh codespace cp` command, including additional f
|
||||
You can forward a port on a codespace to a local port. The port remains forwarded as long as the process is running. To stop forwarding the port, press <kbd>Control</kbd>+<kbd>C</kbd>.
|
||||
|
||||
```shell
|
||||
gh codespace ports forward <em>codespace-port-number</em>:<em>local-port-number</em> -c <em>codespace-name</em>
|
||||
gh codespace ports forward CODESPACE-PORT_NAME:LOCAL-PORT-NAME -c CODESPACE-NAME
|
||||
```
|
||||
|
||||
To see details of forwarded ports enter `gh codespace ports` and then choose a codespace.
|
||||
@@ -179,13 +179,13 @@ To see details of forwarded ports enter `gh codespace ports` and then choose a c
|
||||
You can set the visibility of a forwarded port. {% data reusables.codespaces.port-visibility-settings %}
|
||||
|
||||
```shell
|
||||
gh codespace ports visibility <em>codespace-port</em>:<em>private|org|public</em> -c <em>codespace-name</em>
|
||||
gh codespace ports visibility CODESPACE-PORT:private|org|public -c CODESPACE-NAME
|
||||
```
|
||||
|
||||
You can set the visibility for multiple ports with one command. For example:
|
||||
|
||||
```shell
|
||||
gh codespace ports visibility 80:private 3000:public 3306:org -c <em>codespace-name</em>
|
||||
gh codespace ports visibility 80:private 3000:public 3306:org -c CODESPACE-NAME
|
||||
```
|
||||
|
||||
For more information, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)."
|
||||
@@ -195,7 +195,7 @@ For more information, see "[Forwarding ports in your codespace](/codespaces/deve
|
||||
You can see the creation log for a codespace. After entering this command you will be asked to enter the passphrase for your SSH key.
|
||||
|
||||
```shell
|
||||
gh codespace logs -c <em>codespace-name</em>
|
||||
gh codespace logs -c CODESPACE-NAME
|
||||
```
|
||||
|
||||
For more information about the creation log, see "[{% data variables.product.prodname_github_codespaces %} logs](/codespaces/troubleshooting/github-codespaces-logs#creation-logs)."
|
||||
|
||||
@@ -55,7 +55,7 @@ Every wiki provides an easy way to clone its contents down to your computer.
|
||||
Once you've created an initial page on {% data variables.product.product_name %}, you can clone the repository to your computer with the provided URL:
|
||||
|
||||
```shell
|
||||
$ git clone https://github.com/<em>YOUR_USERNAME</em>/<em>YOUR_REPOSITORY</em>.wiki.git
|
||||
$ git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.wiki.git
|
||||
# Clones the wiki locally
|
||||
```
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ You can create default contribution guidelines for your organization{% ifversion
|
||||
|
||||
If you're stumped, here are some good examples of contribution guidelines:
|
||||
|
||||
- The Atom editor [contribution guidelines](https://github.com/atom/atom/blob/master/CONTRIBUTING.md).
|
||||
- The {% data variables.product.prodname_docs %} [contribution guidelines](https://github.com/github/docs/blob/main/CONTRIBUTING.md).
|
||||
- The Ruby on Rails [contribution guidelines](https://github.com/rails/rails/blob/main/CONTRIBUTING.md).
|
||||
- The Open Government [contribution guidelines](https://github.com/opengovernment/opengovernment/blob/master/CONTRIBUTING.md).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Making changes in a branch
|
||||
intro: 'Use your favorite text editor, such as [Atom](https://atom.io/), to make changes to your project, then use {% data variables.product.prodname_desktop %} to visualize useful commits.'
|
||||
intro: 'Use your favorite text editor, such as [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/), to make changes to your project, then use {% data variables.product.prodname_desktop %} to visualize useful commits.'
|
||||
redirect_from:
|
||||
- /desktop/contributing-to-projects/making-changes-in-a-branch
|
||||
versions:
|
||||
|
||||
@@ -14,7 +14,6 @@ shortTitle: Configure default editor
|
||||
|
||||
{% mac %}
|
||||
|
||||
- [Atom](https://atom.io/)
|
||||
- [MacVim](https://macvim-dev.github.io/macvim/)
|
||||
- [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/)
|
||||
- [Visual Studio Codium](https://vscodium.com/)
|
||||
@@ -43,7 +42,6 @@ shortTitle: Configure default editor
|
||||
|
||||
{% windows %}
|
||||
|
||||
- [Atom](https://atom.io/)
|
||||
- [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/)
|
||||
- [Visual Studio Codium](https://vscodium.com/)
|
||||
- [Sublime Text](https://www.sublimetext.com/)
|
||||
|
||||
@@ -113,7 +113,7 @@ To troubleshoot, sign out of your account on {% data variables.product.prodname_
|
||||
### Empty token
|
||||
|
||||
```shell
|
||||
info: [ui] [AppStore.withAuthenticatingUser] account found for repository: node - <username> (empty token)
|
||||
info: [ui] [AppStore.withAuthenticatingUser] account found for repository: node - USERNAME (empty token)
|
||||
```
|
||||
|
||||
This error means that {% data variables.product.prodname_desktop %} is unable to find the access token that it created in the system keychain.
|
||||
|
||||
@@ -16,13 +16,13 @@ versions:
|
||||
3. {% data reusables.desktop.launch-desktop-from-command-line %}
|
||||
|
||||
```shell
|
||||
$ github <em>/path/to/repo</em>
|
||||
$ github /PATH/TO/REPO
|
||||
```
|
||||
|
||||
You can also change to your repository path and then type `github .` to open that repository.
|
||||
|
||||
```shell
|
||||
$ cd <em>/path/to/repo</em>
|
||||
$ cd /PATH/TO/REPO
|
||||
[repo]$ github .
|
||||
```
|
||||
|
||||
@@ -34,13 +34,13 @@ versions:
|
||||
2. {% data reusables.desktop.launch-desktop-from-command-line %}
|
||||
|
||||
```shell
|
||||
C:\Users\octocat> github <em>path\to\repo</em>
|
||||
C:\Users\octocat> github PATH\TO\REPO
|
||||
```
|
||||
|
||||
You can also change to your repository path and then type `github .` to open that repository.
|
||||
|
||||
```shell
|
||||
C:\Users\octocat> cd <em>repo\myrepo</em>
|
||||
C:\Users\octocat> cd REPO\MY-REPO
|
||||
C:\Users\octocat\repo\myrepo> github .
|
||||
```
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ To verify a private key:
|
||||

|
||||
2. Generate the fingerprint of your private key (PEM) locally by using the following command:
|
||||
```shell
|
||||
$ openssl rsa -in <em>PATH_TO_PEM_FILE</em> -pubout -outform DER | openssl sha256 -binary | openssl base64
|
||||
$ openssl rsa -in PATH_TO_PEM_FILE -pubout -outform DER | openssl sha256 -binary | openssl base64
|
||||
```
|
||||
3. Compare the results of the locally generated fingerprint to the fingerprint you see in {% data variables.product.product_name %}.
|
||||
|
||||
|
||||
@@ -83,13 +83,15 @@ See [our guide on creating a personal access token](/authentication/keeping-your
|
||||
#### Setup
|
||||
|
||||
1. [Run the `ssh-keygen` procedure][generating-ssh-keys] on your server, and remember where you save the generated public and private rsa key pair.
|
||||
2. In the upper-right corner of any {% data variables.product.product_name %} page, click your profile photo, then click **Your profile**. 
|
||||
3. On your profile page, click **Repositories**, then click the name of your repository. 
|
||||
4. From your repository, click **Settings**. 
|
||||
5. In the sidebar, click **Deploy Keys**, then click **Add deploy key**. 
|
||||
6. Provide a title, paste in your public key. 
|
||||
7. Select **Allow write access** if you want this key to have write access to the repository. A deploy key with write access lets a deployment push to the repository.
|
||||
8. Click **Add key**.
|
||||
{% data reusables.profile.navigating-to-profile %}
|
||||
|
||||

|
||||
1. On your profile page, click **Repositories**, then click the name of your repository. 
|
||||
2. From your repository, click **Settings**. 
|
||||
3. In the sidebar, click **Deploy Keys**, then click **Add deploy key**. 
|
||||
4. Provide a title, paste in your public key. 
|
||||
5. Select **Allow write access** if you want this key to have write access to the repository. A deploy key with write access lets a deployment push to the repository.
|
||||
6. Click **Add key**.
|
||||
|
||||
#### Using multiple repositories on one server
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ You can test that your local key works by entering `ssh -T git@{% ifversion ghes
|
||||
```shell
|
||||
$ ssh -T git@{% ifversion ghes or ghae %}hostname{% else %}github.com{% endif %}
|
||||
# Attempt to SSH in to github
|
||||
> Hi <em>username</em>! You've successfully authenticated, but GitHub does not provide
|
||||
> Hi USERNAME! You've successfully authenticated, but GitHub does not provide
|
||||
> shell access.
|
||||
```
|
||||
|
||||
@@ -68,7 +68,7 @@ If the variable is not set, it means that agent forwarding is not working:
|
||||
```shell
|
||||
$ echo "$SSH_AUTH_SOCK"
|
||||
# Print out the SSH_AUTH_SOCK variable
|
||||
> <em>[No output]</em>
|
||||
> [No output]
|
||||
$ ssh -T git@{% ifversion ghes or ghae %}hostname{% else %}github.com{% endif %}
|
||||
# Try to SSH to github
|
||||
> Permission denied (publickey).
|
||||
@@ -84,7 +84,7 @@ SSH forwarding only works with SSH URLs, not HTTP(s) URLs. Check the `.git/confi
|
||||
|
||||
```shell
|
||||
[remote "origin"]
|
||||
url = git@{% ifversion ghes or ghae %}hostname{% else %}github.com{% endif %}:<em>yourAccount</em>/<em>yourProject</em>.git
|
||||
url = git@{% ifversion ghes or ghae %}hostname{% else %}github.com{% endif %}:YOUR_ACCOUNT/YOUR_PROJECT.git
|
||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||
```
|
||||
|
||||
@@ -97,10 +97,10 @@ Before you can make your keys work through agent forwarding, they must work loca
|
||||
Sometimes, system configurations disallow SSH agent forwarding. You can check if a system configuration file is being used by entering the following command in the terminal:
|
||||
|
||||
```shell
|
||||
$ ssh -v <em>example.com</em>
|
||||
# Connect to example.com with verbose debug output
|
||||
$ ssh -v URL
|
||||
# Connect to the specified URL with verbose debug output
|
||||
> OpenSSH_8.1p1, LibreSSL 2.7.3</span>
|
||||
> debug1: Reading configuration data /Users/<em>you</em>/.ssh/config
|
||||
> debug1: Reading configuration data /Users/YOU/.ssh/config
|
||||
> debug1: Applying options for example.com
|
||||
> debug1: Reading configuration data /etc/ssh_config
|
||||
> debug1: Applying options for *
|
||||
@@ -147,7 +147,7 @@ ssh-add -L
|
||||
If the command says that no identity is available, you'll need to add your key:
|
||||
|
||||
```shell
|
||||
$ ssh-add <em>yourkey</em>
|
||||
$ ssh-add YOUR-KEY
|
||||
```
|
||||
|
||||
{% tip %}
|
||||
@@ -155,7 +155,7 @@ $ ssh-add <em>yourkey</em>
|
||||
On macOS, `ssh-agent` will "forget" this key, once it gets restarted during reboots. But you can import your SSH keys into Keychain using this command:
|
||||
|
||||
```shell
|
||||
$ ssh-add -K <em>yourkey</em>
|
||||
$ ssh-add -K YOUR-KEY
|
||||
```
|
||||
|
||||
{% endtip %}
|
||||
|
||||
@@ -26,7 +26,7 @@ For the purposes of this tutorial, we're going to use a local server to receive
|
||||
After installing `ngrok`, you can expose your localhost by running `./ngrok http 4567` on the command line. 4567 is the port number on which our server will listen for messages. You should see a line that looks something like this:
|
||||
|
||||
```shell
|
||||
$ Forwarding http://7e9ea9dc.ngrok.io -> 127.0.0.1:4567
|
||||
$ Forwarding http://7e9ea9dc.ngrok.io -> 127.0.0.1:4567
|
||||
```
|
||||
|
||||
Make a note of the `*.ngrok.io` URL. We'll use it to set up our webhook.
|
||||
|
||||
@@ -30,7 +30,7 @@ To set your token on GitHub:
|
||||
Next, set up an environment variable on your server that stores this token. Typically, this is as simple as running:
|
||||
|
||||
```shell
|
||||
$ export SECRET_TOKEN=<em>your_token</em>
|
||||
$ export SECRET_TOKEN=YOUR-TOKEN
|
||||
```
|
||||
|
||||
**Never** hardcode the token into your app!
|
||||
|
||||
@@ -13,11 +13,7 @@ shortTitle: Extensions & integrations
|
||||
---
|
||||
## Editor tools
|
||||
|
||||
You can connect to {% data variables.product.product_name %} repositories within third-party editor tools, such as Atom, Unity, and {% data variables.product.prodname_vs %}.
|
||||
|
||||
### {% data variables.product.product_name %} for Atom
|
||||
|
||||
With the {% data variables.product.product_name %} for Atom extension, you can commit, push, pull, resolve merge conflicts, and more from the Atom editor. For more information, see the official [{% data variables.product.product_name %} for Atom site](https://github.atom.io/).
|
||||
You can connect to {% data variables.product.product_name %} repositories within third-party editor tools such as Unity and {% data variables.product.prodname_vs %}.
|
||||
|
||||
### {% data variables.product.product_name %} for Unity
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ You can use the `git remote add` command to match a remote URL with a name.
|
||||
For example, you'd type the following in the command line:
|
||||
|
||||
```shell
|
||||
git remote add origin <em> <REMOTE_URL> </em>
|
||||
git remote add origin <REMOTE_URL>
|
||||
```
|
||||
|
||||
This associates the name `origin` with the `REMOTE_URL`.
|
||||
|
||||
@@ -18,15 +18,6 @@ shortTitle: Associate text editors
|
||||
---
|
||||
{% mac %}
|
||||
|
||||
## Using Atom as your editor
|
||||
|
||||
1. Install [Atom](https://atom.io/). For more information, see "[Installing Atom](https://flight-manual.atom.io/getting-started/sections/installing-atom/)" in the Atom documentation.
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
3. Type this command:
|
||||
```shell
|
||||
$ git config --global core.editor "atom --wait"
|
||||
```
|
||||
|
||||
## Using {% data variables.product.prodname_vscode %} as your editor
|
||||
|
||||
1. Install [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) ({% data variables.product.prodname_vscode_shortname %}). For more information, see "[Setting up {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/Docs/setup/setup-overview)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
@@ -58,15 +49,6 @@ shortTitle: Associate text editors
|
||||
|
||||
{% windows %}
|
||||
|
||||
## Using Atom as your editor
|
||||
|
||||
1. Install [Atom](https://atom.io/). For more information, see "[Installing Atom](https://flight-manual.atom.io/getting-started/sections/installing-atom/)" in the Atom documentation.
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
3. Type this command:
|
||||
```shell
|
||||
$ git config --global core.editor "atom --wait"
|
||||
```
|
||||
|
||||
## Using {% data variables.product.prodname_vscode %} as your editor
|
||||
|
||||
1. Install [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) ({% data variables.product.prodname_vscode_shortname %}). For more information, see "[Setting up {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/Docs/setup/setup-overview)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
@@ -97,15 +79,6 @@ shortTitle: Associate text editors
|
||||
|
||||
{% linux %}
|
||||
|
||||
## Using Atom as your editor
|
||||
|
||||
1. Install [Atom](https://atom.io/). For more information, see "[Installing Atom](https://flight-manual.atom.io/getting-started/sections/installing-atom/)" in the Atom documentation.
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
3. Type this command:
|
||||
```shell
|
||||
$ git config --global core.editor "atom --wait"
|
||||
```
|
||||
|
||||
## Using {% data variables.product.prodname_vscode %} as your editor
|
||||
|
||||
1. Install [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) ({% data variables.product.prodname_vscode_shortname %}). For more information, see "[Setting up {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/Docs/setup/setup-overview)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
|
||||
@@ -35,7 +35,7 @@ For an example *.gitignore* file, see "[Some common .gitignore configurations](h
|
||||
If you want to ignore a file that is already checked in, you must untrack the file before you add a rule to ignore it. From your terminal, untrack the file.
|
||||
|
||||
```shell
|
||||
$ git rm --cached <em>FILENAME</em>
|
||||
$ git rm --cached FILENAME
|
||||
```
|
||||
|
||||
## Configuring ignored files for all repositories on your computer
|
||||
|
||||
@@ -36,13 +36,13 @@ The `git remote add` command takes two arguments:
|
||||
For example:
|
||||
|
||||
```shell
|
||||
$ git remote add origin https://{% data variables.command_line.codeblock %}/<em>user</em>/<em>repo</em>.git
|
||||
$ git remote add origin https://{% data variables.command_line.codeblock %}/USER/REPO>.git
|
||||
# Set a new remote
|
||||
|
||||
$ git remote -v
|
||||
# Verify new remote
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>user</em>/<em>repo</em>.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>user</em>/<em>repo</em>.git (push)
|
||||
> origin https://{% data variables.command_line.codeblock %}/USER/REPO.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/USER/REPO.git (push)
|
||||
```
|
||||
|
||||
For more information on which URL to use, see "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)."
|
||||
@@ -77,11 +77,11 @@ The `git remote set-url` command takes two arguments:
|
||||
* A new URL for the remote. For example:
|
||||
* If you're updating to use HTTPS, your URL might look like:
|
||||
```shell
|
||||
https://{% data variables.command_line.backticks %}/<em>USERNAME</em>/<em>REPOSITORY</em>.git
|
||||
https://{% data variables.command_line.backticks %}/USERNAME/REPOSITORY.git
|
||||
```
|
||||
* If you're updating to use SSH, your URL might look like:
|
||||
```shell
|
||||
git@{% data variables.command_line.codeblock %}:<em>USERNAME</em>/<em>REPOSITORY</em>.git
|
||||
git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git
|
||||
```
|
||||
|
||||
### Switching remote URLs from SSH to HTTPS
|
||||
@@ -91,19 +91,19 @@ git@{% data variables.command_line.codeblock %}:<em>USERNAME</em>/<em>REPOSITORY
|
||||
3. List your existing remotes in order to get the name of the remote you want to change.
|
||||
```shell
|
||||
$ git remote -v
|
||||
> origin git@{% data variables.command_line.codeblock %}:<em>USERNAME/REPOSITORY</em>.git (fetch)
|
||||
> origin git@{% data variables.command_line.codeblock %}:<em>USERNAME/REPOSITORY</em>.git (push)
|
||||
> origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git (fetch)
|
||||
> origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git (push)
|
||||
```
|
||||
4. Change your remote's URL from SSH to HTTPS with the `git remote set-url` command.
|
||||
```shell
|
||||
$ git remote set-url origin https://{% data variables.command_line.codeblock %}/<em>USERNAME</em>/<em>REPOSITORY</em>.git
|
||||
$ git remote set-url origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git
|
||||
```
|
||||
5. Verify that the remote URL has changed.
|
||||
```shell
|
||||
$ git remote -v
|
||||
# Verify new remote URL
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>USERNAME/REPOSITORY</em>.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>USERNAME/REPOSITORY</em>.git (push)
|
||||
> origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (push)
|
||||
```
|
||||
|
||||
The next time you `git fetch`, `git pull`, or `git push` to the remote repository, you'll be asked for your GitHub username and password. {% data reusables.user-settings.password-authentication-deprecation %}
|
||||
@@ -117,19 +117,19 @@ You can [use a credential helper](/github/getting-started-with-github/caching-yo
|
||||
3. List your existing remotes in order to get the name of the remote you want to change.
|
||||
```shell
|
||||
$ git remote -v
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>USERNAME/REPOSITORY</em>.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>USERNAME/REPOSITORY</em>.git (push)
|
||||
> origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (push)
|
||||
```
|
||||
4. Change your remote's URL from HTTPS to SSH with the `git remote set-url` command.
|
||||
```shell
|
||||
$ git remote set-url origin git@{% data variables.command_line.codeblock %}:<em>USERNAME</em>/<em>REPOSITORY</em>.git
|
||||
$ git remote set-url origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git
|
||||
```
|
||||
5. Verify that the remote URL has changed.
|
||||
```shell
|
||||
$ git remote -v
|
||||
# Verify new remote URL
|
||||
> origin git@{% data variables.command_line.codeblock %}:<em>USERNAME/REPOSITORY</em>.git (fetch)
|
||||
> origin git@{% data variables.command_line.codeblock %}:<em>USERNAME/REPOSITORY</em>.git (push)
|
||||
> origin git@{% data variables.command_line.codeblock %}: USERNAME/REPOSITORY.git (fetch)
|
||||
> origin git@{% data variables.command_line.codeblock %}: USERNAME/REPOSITORY.git (push)
|
||||
```
|
||||
|
||||
### Troubleshooting: No such remote '[name]'
|
||||
@@ -158,16 +158,16 @@ These examples assume you're [cloning using HTTPS](/github/getting-started-with-
|
||||
```shell
|
||||
$ git remote -v
|
||||
# View existing remotes
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>OWNER</em>/<em>REPOSITORY</em>.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>OWNER</em>/<em>REPOSITORY</em>.git (push)
|
||||
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push)
|
||||
|
||||
$ git remote rename origin destination
|
||||
# Change remote name from 'origin' to 'destination'
|
||||
|
||||
$ git remote -v
|
||||
# Verify remote's new name
|
||||
> destination https://{% data variables.command_line.codeblock %}/<em>OWNER</em>/<em>REPOSITORY</em>.git (fetch)
|
||||
> destination https://{% data variables.command_line.codeblock %}/<em>OWNER</em>/<em>REPOSITORY</em>.git (push)
|
||||
> destination https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch)
|
||||
> destination https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push)
|
||||
```
|
||||
|
||||
### Troubleshooting: Could not rename config section 'remote.[old name]' to 'remote.[new name]'
|
||||
@@ -179,8 +179,8 @@ You can check which remotes currently exist with the `git remote -v` command:
|
||||
```shell
|
||||
$ git remote -v
|
||||
# View existing remotes
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>OWNER</em>/<em>REPOSITORY</em>.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>OWNER</em>/<em>REPOSITORY</em>.git (push)
|
||||
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push)
|
||||
```
|
||||
|
||||
### Troubleshooting: Remote [new name] already exists
|
||||
@@ -203,22 +203,22 @@ These examples assume you're [cloning using HTTPS](/github/getting-started-with-
|
||||
```shell
|
||||
$ git remote -v
|
||||
# View current remotes
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>OWNER/REPOSITORY</em>.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>OWNER/REPOSITORY</em>.git (push)
|
||||
> destination https://{% data variables.command_line.codeblock %}/<em>FORKER/REPOSITORY</em>.git (fetch)
|
||||
> destination https://{% data variables.command_line.codeblock %}/<em>FORKER/REPOSITORY</em>.git (push)
|
||||
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push)
|
||||
> destination https://{% data variables.command_line.codeblock %}/FORKER/REPOSITORY.git (fetch)
|
||||
> destination https://{% data variables.command_line.codeblock %}/FORKER/REPOSITORY.git (push)
|
||||
|
||||
$ git remote rm destination
|
||||
# Remove remote
|
||||
$ git remote -v
|
||||
# Verify it's gone
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>OWNER/REPOSITORY</em>.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>OWNER/REPOSITORY</em>.git (push)
|
||||
> origin https://{% data variables.command_line.codeblock %}/ OWNER/REPOSITORY.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/ OWNER/REPOSITORY.git (push)
|
||||
```
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Note**: `git remote rm` does not delete the remote repository from the server. It simply
|
||||
**Note**: `git remote rm` does not delete the remote repository from the server. It simply
|
||||
removes the remote and its references from your local repository.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
@@ -24,7 +24,7 @@ Changing the name associated with your Git commits using `git config` will only
|
||||
|
||||
2. {% data reusables.user-settings.set_your_git_username %}
|
||||
```shell
|
||||
$ git config --global user.name "<em>Mona Lisa</em>"
|
||||
$ git config --global user.name "Mona Lisa"
|
||||
```
|
||||
|
||||
3. {% data reusables.user-settings.confirm_git_username_correct %}
|
||||
@@ -41,7 +41,7 @@ Changing the name associated with your Git commits using `git config` will only
|
||||
|
||||
3. {% data reusables.user-settings.set_your_git_username %}
|
||||
```shell
|
||||
$ git config user.name "<em>Mona Lisa</em>"
|
||||
$ git config user.name "Mona Lisa"
|
||||
```
|
||||
|
||||
3. {% data reusables.user-settings.confirm_git_username_correct %}
|
||||
|
||||