[Improvement] New troubleshooting scenario for GPG signing in Codespaces (#38970)
Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
This commit is contained in:
BIN
assets/images/help/codespaces/gpg-vscode-setting.png
Normal file
BIN
assets/images/help/codespaces/gpg-vscode-setting.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
BIN
assets/images/help/codespaces/vscode-settings.png
Normal file
BIN
assets/images/help/codespaces/vscode-settings.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
@@ -18,7 +18,7 @@ redirect_from:
|
|||||||
|
|
||||||
{% data variables.product.prodname_github_codespaces %} provides you with many of the capabilities you might need to work with pull requests:
|
{% data variables.product.prodname_github_codespaces %} provides you with many of the capabilities you might need to work with pull requests:
|
||||||
|
|
||||||
- [Create a pull request](/codespaces/developing-in-codespaces/using-source-control-in-your-codespace#raising-a-pull-request) - Using either the Terminal and Git commands or the Source Control view, you can create pull requests just as you would on {% data variables.product.prodname_dotcom_the_website %}. If the repository uses a pull request template, you'll be able to use this within the Source Control view.
|
- [Create a pull request](/codespaces/developing-in-codespaces/using-source-control-in-your-codespace#raising-a-pull-request) - Using either the Terminal and Git commands or the "Source Control" view, you can create pull requests just as you would on {% data variables.product.prodname_dotcom_the_website %}. If the repository uses a pull request template, you'll be able to use this within the "Source Control" view.
|
||||||
- [Open a pull request](#opening-a-pull-request-in-codespaces) – You can open an existing pull request in a codespace, provided you have codespace access to the branch that is being merged in.
|
- [Open a pull request](#opening-a-pull-request-in-codespaces) – You can open an existing pull request in a codespace, provided you have codespace access to the branch that is being merged in.
|
||||||
- [Review a pull request](#reviewing-a-pull-request-in-codespaces) - Once you have opened a pull request in a codespace, you can use the "GitHub Pull Request" view to add review comments and approve pull requests. You can also use {% data variables.product.prodname_github_codespaces %} to [view review comments](#view-comments-from-a-review-in-codespaces).
|
- [Review a pull request](#reviewing-a-pull-request-in-codespaces) - Once you have opened a pull request in a codespace, you can use the "GitHub Pull Request" view to add review comments and approve pull requests. You can also use {% data variables.product.prodname_github_codespaces %} to [view review comments](#view-comments-from-a-review-in-codespaces).
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ To continue your work in a codespace, click **Continue Working on…** and selec
|
|||||||
|
|
||||||
## Using source control
|
## Using source control
|
||||||
|
|
||||||
When you use {% data variables.codespaces.serverless %}, all actions are managed through the Source Control View, which is located in the Activity Bar on the left hand side. For more information on the Source Control View, see "[Version Control](https://code.visualstudio.com/docs/editor/versioncontrol)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
When you use {% data variables.codespaces.serverless %}, all actions are managed through the "Source Control" view, which is located in the Activity Bar on the left hand side. For more information on the "Source Control" view, see "[Version Control](https://code.visualstudio.com/docs/editor/versioncontrol)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||||
|
|
||||||
Because {% data variables.codespaces.serverless %} uses the GitHub Repositories extension to power its functionality, you can switch branches without needing to stash changes. For more information, see "[GitHub Repositories](https://code.visualstudio.com/docs/editor/github#_github-repositories-extension)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
Because {% data variables.codespaces.serverless %} uses the GitHub Repositories extension to power its functionality, you can switch branches without needing to stash changes. For more information, see "[GitHub Repositories](https://code.visualstudio.com/docs/editor/github#_github-repositories-extension)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||||
|
|
||||||
|
|||||||
@@ -14,18 +14,13 @@ If you enable GPG verification, {% data variables.product.prodname_github_codesp
|
|||||||
|
|
||||||
{% data reusables.codespaces.gpg-in-active-codespaces %}
|
{% data reusables.codespaces.gpg-in-active-codespaces %}
|
||||||
|
|
||||||
If {% data variables.product.prodname_github_codespaces %} fails to sign a commit, you may see an error like the following.
|
If {% data variables.product.prodname_github_codespaces %} fails to sign a commit, you may see the error message `gpg failed to sign the data` in the command line or in a {% data variables.product.prodname_vscode %} pop-up window.
|
||||||
|
|
||||||
```Shell
|
The following sections of this article provide troubleshooting advice for common causes of this error.
|
||||||
$ git commit -m 'Initial commit'
|
|
||||||
error: gpg failed to sign the data
|
|
||||||
fatal: failed to write commit object
|
|
||||||
```
|
|
||||||
|
|
||||||
You may encounter this error if:
|
- If GPG verification has previously been enabled in your settings for {% data variables.product.prodname_github_codespaces %}, and you have recently disabled GPG verification or removed a repository from your list of trusted repositories, Git may still be trying to sign your commits. For more information, see "[Errors after disabling GPG verification](#errors-after-disabling-gpg-verification)."
|
||||||
|
- If GPG verification is enabled for the codespace, you may have overridden the Git configuration required to sign your commits. For more information, see "[Errors caused by conflicting Git configuration](#errors-caused-by-conflicting-git-configuration)."
|
||||||
- You have disabled GPG verification, and are trying to make a regular, unsigned commit in an existing codespace.
|
- If GPG verification is disabled for the codespace, and you're encountering the error when trying to commit from the "Source Control" view in {% data variables.product.prodname_vscode_shortname %}, this may be because of your {% data variables.product.prodname_vscode_shortname %} settings. For more information, see "[Errors in the {% data variables.product.prodname_vscode_shortname %} "Source Control" view](#errors-in-the-vs-code-source-control-view)."
|
||||||
- You have enabled GPG verification, but have overridden the Git configuration required for {% data variables.product.prodname_github_codespaces %} to sign your commits, for example by linking {% data variables.product.prodname_github_codespaces %} with a dotfiles repository that contains Git configuration files.
|
|
||||||
|
|
||||||
## Errors after disabling GPG verification
|
## Errors after disabling GPG verification
|
||||||
|
|
||||||
@@ -41,7 +36,7 @@ git config --unset commit.gpgsign
|
|||||||
|
|
||||||
To check that the value has been correctly removed from your configuration, you can enter `git config --list`. You should not see a value for `commit.gpgsign` in the list.
|
To check that the value has been correctly removed from your configuration, you can enter `git config --list`. You should not see a value for `commit.gpgsign` in the list.
|
||||||
|
|
||||||
## Errors caused by conflicting configuration
|
## Errors caused by conflicting Git configuration
|
||||||
|
|
||||||
To automatically sign your commits, {% data variables.product.prodname_github_codespaces %} sets certain Git configuration values in your codespace. If you override the values set by {% data variables.product.prodname_github_codespaces %}, you may be unable to sign your commits.
|
To automatically sign your commits, {% data variables.product.prodname_github_codespaces %} sets certain Git configuration values in your codespace. If you override the values set by {% data variables.product.prodname_github_codespaces %}, you may be unable to sign your commits.
|
||||||
|
|
||||||
@@ -108,6 +103,23 @@ if [ -z "$CODESPACES" ]; then
|
|||||||
fi
|
fi
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Errors in the {% data variables.product.prodname_vscode_shortname %} "Source Control" view
|
||||||
|
|
||||||
|
If GPG verification is disabled in your settings for {% data variables.product.prodname_github_codespaces %}, or the repository you created the codespace from isn't in your list of trusted repositories, then Git should not attempt to sign your commits. If you encounter a signing error when trying to commit from the "Source Control" view in {% data variables.product.prodname_vscode_shortname %}, you should check the {% data variables.product.prodname_vscode_shortname %} settings in your codespace.
|
||||||
|
|
||||||
|
1. In the lower-left corner of the window, select **{% octicon "gear" aria-label="Manage" %}**, then click **Settings**.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. On the "User" tab, in the search bar, search for "gpg".
|
||||||
|
1. Verify that the "Enables commit signing with GPG or X.509" setting is deselected.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
If you find this setting is enabled, you should either deselect the checkbox to stop {% data variables.product.prodname_vscode_shortname %} trying to sign your commits, or you should enable GPG verification for the repository you're working in so your commits can be signed successfully.
|
||||||
|
|
||||||
|
If you change your {% data variables.product.prodname_vscode_shortname %} settings, you must ensure Settings Sync is enabled if you want to share your changes with other codespaces you create. You should only turn on Settings Sync in a codespace created from a repository you trust. For more information, see "[AUTOTITLE](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account#settings-sync)."
|
||||||
|
|
||||||
## Further reading
|
## Further reading
|
||||||
|
|
||||||
- "[AUTOTITLE](/authentication/managing-commit-signature-verification/about-commit-signature-verification)"
|
- "[AUTOTITLE](/authentication/managing-commit-signature-verification/about-commit-signature-verification)"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ The steps described below assume you have GitHub Codespaces set up to edit files
|
|||||||
In most cases, the path to the file, below the `content` directory, matches the path in URL, minus the `.md` file name extension. For example, the source for the article <code>https<span></span>://docs.github.com/en/**codespaces/getting-started/quickstart**</code> is the markdown file <code>content/**codespaces/getting-started/quickstart**.md</code>.
|
In most cases, the path to the file, below the `content` directory, matches the path in URL, minus the `.md` file name extension. For example, the source for the article <code>https<span></span>://docs.github.com/en/**codespaces/getting-started/quickstart**</code> is the markdown file <code>content/**codespaces/getting-started/quickstart**.md</code>.
|
||||||
1. Edit the markdown file as required.
|
1. Edit the markdown file as required.
|
||||||
1. Save your changes.
|
1. Save your changes.
|
||||||
1. Commit and push your changes, either using the Source Control pane, or using Git commands from the Terminal. For more information, see "[About Git](https://docs.github.com/en/get-started/using-git/about-git)."
|
1. Commit and push your changes, either using the "Source Control" view, or using Git commands from the Terminal. For more information, see "[About Git](https://docs.github.com/en/get-started/using-git/about-git)."
|
||||||
1. Go to the **Pull requests** tab of the `github/docs` repository: https://github.com/github/docs/pulls
|
1. Go to the **Pull requests** tab of the `github/docs` repository: https://github.com/github/docs/pulls
|
||||||
1. Click **New pull request**.
|
1. Click **New pull request**.
|
||||||
1. If you're an open source contributor: click **compare across forks** and choose the forked repository you created, and your working branch.<br>
|
1. If you're an open source contributor: click **compare across forks** and choose the forked repository you created, and your working branch.<br>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ If you're working in a codespace, you can publish it from the {% data variables.
|
|||||||
|
|
||||||
{% note %}
|
{% note %}
|
||||||
|
|
||||||
**Note:** If you start from {% data variables.product.company_short %}'s blank template, you will not see a list of changes unless you have already initialized your directory as a Git repository. To publish codespaces created from the blank template, click **Publish to {% data variables.product.company_short %}** in the Source Control view, then skip to step 5.
|
**Note:** If you start from {% data variables.product.company_short %}'s blank template, you will not see a list of changes unless you have already initialized your directory as a Git repository. To publish codespaces created from the blank template, click **Publish to {% data variables.product.company_short %}** in the "Source Control" view, then skip to step 5.
|
||||||
|
|
||||||
{% endnote %}
|
{% endnote %}
|
||||||
1. To commit your staged changes, type a commit message describing the change you've made, then click **Commit**.
|
1. To commit your staged changes, type a commit message describing the change you've made, then click **Commit**.
|
||||||
|
|||||||
Reference in New Issue
Block a user