From 4a4ba2d78aa37b0cdaccc71cf8f1a58577a4c102 Mon Sep 17 00:00:00 2001 From: Laura Coursen Date: Tue, 30 Apr 2024 10:52:23 -0500 Subject: [PATCH 1/2] Add replacedomain to test articles (#50300) Co-authored-by: Peter Bengtsson --- ...-ssh-key-and-adding-it-to-the-ssh-agent.md | 4 +- .../testing-your-ssh-connection.md | 13 ++++--- .../error-permission-denied-publickey.md | 39 ++++++++++++++----- 3 files changed, 38 insertions(+), 18 deletions(-) diff --git a/content/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent.md b/content/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent.md index cc5bf751ea..b518c8df1f 100644 --- a/content/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent.md +++ b/content/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent.md @@ -119,7 +119,7 @@ Before adding a new SSH key to the ssh-agent to manage your keys, you should hav - Open your `~/.ssh/config` file, then modify the file to contain the following lines. If your SSH key file has a different name or path than the example code, modify the filename or path to match your current setup. - ```text + ```text replacedomain copy Host {% ifversion ghes %}HOSTNAME{% else %}github.com{% endif %} AddKeysToAgent yes UseKeychain yes @@ -134,7 +134,7 @@ Before adding a new SSH key to the ssh-agent to manage your keys, you should hav - If you see a `Bad configuration option: usekeychain` error, add an additional line to the configuration's' `Host *.{% ifversion ghes %}HOSTNAME{% else %}github.com{% endif %}` section. - ```text + ```text replacedomain copy Host {% ifversion ghes %}HOSTNAME{% else %}github.com{% endif %} IgnoreUnknown UseKeychain ``` diff --git a/content/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection.md b/content/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection.md index 5482fb204b..09dda3c654 100644 --- a/content/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection.md +++ b/content/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection.md @@ -1,6 +1,6 @@ --- title: Testing your SSH connection -intro: 'After you''ve set up your SSH key and added it to your account on {% data variables.location.product_location %}, you can test your connection.' +intro: "After you've set up your SSH key and added it to {% data variables.product.prodname_dotcom %}, you can test your connection." redirect_from: - /articles/testing-your-ssh-connection - /github/authenticating-to-github/testing-your-ssh-connection @@ -13,24 +13,25 @@ topics: - SSH shortTitle: Test your SSH connection --- -Before testing your SSH connection, you should have: + +Before testing your SSH connection, you should have already: - [Checked for existing SSH keys](/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys) - [Generated a new SSH key](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) - [Added a new SSH key to your GitHub account](/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) -When you test your connection, you'll need to authenticate this action using your password, which is the SSH key passphrase you created earlier. For more information on working with SSH key passphrases, see "[AUTOTITLE](/authentication/connecting-to-github-with-ssh/working-with-ssh-key-passphrases)." +You'll need to authenticate this action using your password, which is the SSH key passphrase you created earlier. See "[AUTOTITLE](/authentication/connecting-to-github-with-ssh/working-with-ssh-key-passphrases)." {% data reusables.command_line.open_the_multi_os_terminal %} 1. Enter the following: - ```shell - $ ssh -T git@{% data variables.command_line.codeblock %} + ```shell replacedomain copy + ssh -T git@{% data variables.command_line.codeblock %} # Attempts to ssh to {% data variables.product.product_name %} ``` You may see a warning like this: - ```shell + ```shell replacedomain > The authenticity of host '{% data variables.command_line.codeblock %} (IP ADDRESS)' can't be established. > ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU. > Are you sure you want to continue connecting (yes/no)? diff --git a/content/authentication/troubleshooting-ssh/error-permission-denied-publickey.md b/content/authentication/troubleshooting-ssh/error-permission-denied-publickey.md index 95a3c7db18..daf0095e4c 100644 --- a/content/authentication/troubleshooting-ssh/error-permission-denied-publickey.md +++ b/content/authentication/troubleshooting-ssh/error-permission-denied-publickey.md @@ -13,18 +13,24 @@ topics: - SSH shortTitle: Permission denied (publickey) --- + ## Should the `sudo` command or elevated privileges be used with Git? -You should not be using the `sudo` command or elevated privileges, such as administrator permissions, with Git. If you have a _very good reason_ you must use `sudo`, then ensure you are using it with every command (it's probably just better to use `su` to get a shell as root at that point). If you [generate SSH keys](/authentication/connecting-to-github-with-ssh) without `sudo` and then try to use a command like `sudo git push`, you won't be using the same keys that you generated. +You should not be using the `sudo` command or elevated privileges, such as administrator permissions, with Git. + +If you have a _very good reason_ you must use `sudo`, then ensure you are using it with every command. If you [generate SSH keys](/authentication/connecting-to-github-with-ssh) without `sudo` and then try to use a command like `sudo git push`, you won't be using the same keys that you generated. ## Check that you are connecting to the correct server -Typing is hard, we all know it. Pay attention to what you type; you won't be able to connect to "githib.com" or "guthub.com". In some cases, a corporate network may cause issues resolving the DNS record as well. - To make sure you are connecting to the right domain, you can enter the following command: -```shell -$ ssh -vT git@{% data variables.command_line.codeblock %} +```shell replacedomain copy +ssh -vT git@{% data variables.command_line.codeblock %} +``` + +You should see this output: + +```shell replacedomain > OpenSSH_8.1p1, LibreSSL 2.7.3 > debug1: Reading configuration data /Users/YOU/.ssh/config > debug1: Reading configuration data /etc/ssh/ssh_config @@ -38,7 +44,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 +```shell replacedomain $ ssh -T GITHUB-USERNAME@{% data variables.command_line.codeblock %} > Permission denied (publickey). ``` @@ -47,8 +53,13 @@ If your connection failed and you're using a remote URL with your {% data variab You should verify your connection by typing: +```shell replacedomain copy +ssh -T git@{% data variables.command_line.codeblock %} +``` + +You should see this output: + ```shell -$ ssh -T git@{% data variables.command_line.codeblock %} > Hi USERNAME! You've successfully authenticated... ``` @@ -113,8 +124,13 @@ The `ssh-add` command _should_ print out a long string of numbers and letters. I You can also check that the key is being used by trying to connect to `git@{% data variables.command_line.backticks %}`: +```shell replacedomain copy +ssh -vT git@{% data variables.command_line.codeblock %} +``` + +You'll see output like this: + ```shell -$ ssh -vT git@{% data variables.command_line.codeblock %} > ... > debug1: identity file /Users/YOU/.ssh/id_rsa type -1 > debug1: identity file /Users/YOU/.ssh/id_rsa-cert type -1 @@ -129,10 +145,13 @@ $ ssh -vT git@{% data variables.command_line.codeblock %} > Permission denied (publickey). ``` -In that example, we did not have any keys for SSH to use. The "-1" at the end of the "identity file" lines means SSH couldn't find a file to use. Later on, the "Trying private key" lines also indicate that no file was found. If a file existed, those lines would be "1" and "Offering public key", respectively: +In this example, SSH did not find any keys. +- "-1" at the end of the "identity file" lines means SSH couldn't find a file to use. +- "Trying private key" lines indicate that no file was found. + +If a file existed, those lines would be "1" and "Offering public key", as in this output: ```shell -$ ssh -vT git@{% data variables.command_line.codeblock %} > ... > debug1: identity file /Users/YOU/.ssh/id_rsa type 1 > ... From 79877377e49bda9101952ff4539ac3732014b071 Mon Sep 17 00:00:00 2001 From: Tim Rogers Date: Tue, 30 Apr 2024 17:05:35 +0100 Subject: [PATCH 2/2] Update "Copilot Chat in GitHub.com" documentation with new support for summarizing and asking questions about a specific issue (#50277) Co-authored-by: Jess Hosman <1183847+jhosman@users.noreply.github.com> --- .../about-github-copilot-chat-in-githubcom.md | 8 ++++- .../using-github-copilot-chat-in-githubcom.md | 32 ++++++++++++++++++- data/reusables/copilot/open-copilot.md | 7 ++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 data/reusables/copilot/open-copilot.md diff --git a/content/copilot/github-copilot-enterprise/copilot-chat-in-github/about-github-copilot-chat-in-githubcom.md b/content/copilot/github-copilot-enterprise/copilot-chat-in-github/about-github-copilot-chat-in-githubcom.md index a69cd1c160..eff210a613 100644 --- a/content/copilot/github-copilot-enterprise/copilot-chat-in-github/about-github-copilot-chat-in-githubcom.md +++ b/content/copilot/github-copilot-enterprise/copilot-chat-in-github/about-github-copilot-chat-in-githubcom.md @@ -54,7 +54,7 @@ The language model generates a response based on its analysis of the input promp ### Output formatting -The response generated by {% data variables.product.prodname_copilot_chat_short %} is formatted and presented to the user. {% data variables.product.prodname_copilot_chat_short %} may use syntax highlighting, indentation, and other formatting features to add clarity to the generated response. Depending upon the type of question from the user, links to context that the model used when generating a response, such as source code files, Bing search results or documentation, may also be provided. +The response generated by {% data variables.product.prodname_copilot_chat_short %} is formatted and presented to the user. {% data variables.product.prodname_copilot_chat_short %} may use syntax highlighting, indentation, and other formatting features to add clarity to the generated response. Depending upon the type of question from the user, links to context that the model used when generating a response, such as source code files, issues, Bing search results, or documentation, may also be provided. {% data variables.product.prodname_copilot_chat_short %} is intended to provide you with the most relevant answer to your question. However, it may not always provide the answer you are looking for. Users of {% data variables.product.prodname_copilot_chat_short %} are responsible for reviewing and validating responses generated by the system to ensure they are accurate and appropriate. Additionally, as part of our product development process, we undertake red teaming to understand and improve the safety of {% data variables.product.prodname_copilot_chat_short %}. Input prompts and output completions are run through content filters. The content filtering system detects and prevents the output on specific categories of content including harmful, offensive, or off-topic content. For more information on improving the performance of {% data variables.product.prodname_copilot_chat_short %}, see "[Improving performance for {% data variables.product.prodname_copilot_chat_short %}](#improving-performance-for-copilot-chat)." @@ -84,6 +84,12 @@ By generating explanations and suggesting related documentation, {% data variabl {% data variables.product.prodname_copilot_chat_short %} can suggest changes to variables, control structures, or function calls that might resolve the issue and generate code snippets that can be incorporated into the codebase. However, it's important to note that the suggested fixes may not always be optimal or complete, so you'll need to review and test the suggestions. +### Planning coding tasks + +{% data variables.product.prodname_copilot_chat_short %} can read a {% data variables.product.prodname_dotcom %} issue and summarize it, answer questions about it, or propose next steps. This can be useful if you have a long, complex issue with many comments, and you want to understand it quickly or figure out what to do next. + +However, it's important to note that {% data variables.product.prodname_copilot_chat_short %}'s answers and summaries may not always be accurate or complete, so you'll need to review {% data variables.product.prodname_copilot_chat_short %}'s output for accuracy. + ## Improving performance for {% data variables.product.prodname_copilot_chat_short %} {% data variables.product.prodname_copilot_chat_short %} can support a wide range of practical applications like Q&A, code generation, code analysis, and code fixes, each with different performance metrics and mitigation strategies. To enhance performance and address some of the the limitations of {% data variables.product.prodname_copilot_chat_short %}, there are various measures that you can adopt. For more information on the limitations of {% data variables.product.prodname_copilot_chat_short %}, see "[Limitations of {% data variables.product.prodname_copilot_chat %}](#limitations-of-github-copilot-chat)." diff --git a/content/copilot/github-copilot-enterprise/copilot-chat-in-github/using-github-copilot-chat-in-githubcom.md b/content/copilot/github-copilot-enterprise/copilot-chat-in-github/using-github-copilot-chat-in-githubcom.md index 5bde03bf48..7691a3a7de 100644 --- a/content/copilot/github-copilot-enterprise/copilot-chat-in-github/using-github-copilot-chat-in-githubcom.md +++ b/content/copilot/github-copilot-enterprise/copilot-chat-in-github/using-github-copilot-chat-in-githubcom.md @@ -1,7 +1,7 @@ --- title: Using GitHub Copilot Chat in GitHub.com shortTitle: Using Chat in GitHub.com -intro: 'You can use {% data variables.product.prodname_copilot_chat_dotcom %} to answer general questions about software development, or specific questions about the code in a repository.' +intro: 'You can use {% data variables.product.prodname_copilot_chat_dotcom %} to answer general questions about software development, or specific questions about the issues or code in a repository.' versions: feature: 'copilot-on-dotcom' topics: @@ -28,6 +28,7 @@ On {% data variables.product.prodname_dotcom_the_website %}, you can use {% data - Questions asked in the context of a knowledge base (that is, Markdown documentation across one or more repositories). For more information, see "[Asking a question about a knowledge base](#asking-a-question-about-a-knowledge-base)." - Questions about a specific file or specified lines of code within a file. For more information, see "[Asking questions about specific pieces of code](#asking-questions-about-specific-pieces-of-code)." - Questions about a pull request diff. For more information, see "[Finding out about the changes in a pull request](#finding-out-about-the-changes-in-a-pull-request)." +- Questions about a specific issue. For more information, see "[Asking a question about a specific issue](#asking-a-question-about-a-specific-issue)." ### Limitations @@ -59,6 +60,7 @@ You can also explicitly ask {% data variables.product.prodname_copilot_chat_dotc | `show-symbol-definition` | Retrieves the lines of code that define a specific code symbol (function, class, or struct) in the default branch of the Git repository. This skill is useful when you have the exact name of a symbol, and want to understand it. | Yes | _Write unit tests for the AuthUser method_ | | `pathsearch` | Retrieves a specific file in the default branch of the Git repository. This skill is useful when you provide the exact path of a file in the repository. | Yes | _What logic does user_auth.js encapsulate?_ | | `bing-search` | Searches the web using the Bing search engine. This skill is useful for teaching Copilot about recent events, new developments, trends, technologies, or extremely specific, detailed, or niche subjects. | No (requires admin approval - see "[AUTOTITLE](/copilot/github-copilot-enterprise/overview/enabling-github-copilot-enterprise-features)")| _What are some recent articles about SAT tokens securing against vulnerabilities in Node?_ | +| `get-issue` | Retrieves a specific {% data variables.product.prodname_dotcom %} issue, including the issue's title, number, author, status, body, linked pull requests, comments, and timestamps. | Yes | _Summarize the conversation on this issue and suggest next steps_ | ## Asking a general question about software development @@ -269,6 +271,34 @@ You can ask {% data variables.product.prodname_copilot_short %} to explain what' - Explain this `do..end` block. - What's the purpose of this file? +## Asking a question about a specific issue + +You can ask {% data variables.product.prodname_copilot_short %} to summarize or answer questions about a specific issue. {% data variables.product.prodname_copilot_short %} has access to the issue's title, number, author, status, body, linked pull requests, and comments. + +{% note %} + +**Note:** The quality of {% data variables.product.prodname_copilot_chat_short %}'s responses may be degraded when working with issues with very long bodies or large numbers of comments. Where this happens, {% data variables.product.prodname_copilot_short %} will warn you so you can double check its output. + +{% endnote %} + +1. Navigate to an issue on {% data variables.product.prodname_dotcom_the_website %}. + +{% data reusables.copilot.open-copilot %} + +1. At the bottom of the {% data variables.product.prodname_copilot_short %} chat panel, in the "Ask {% data variables.product.prodname_copilot_short %}" box, type a question and press Enter. For example, you could enter: + + - Summarize this issue + - Recommend next steps for this issue + - What are the acceptance criteria for this issue? + + {% tip %} + + **Tip:** Instead of navigating to an issue in your browser, you can also refer to a specific issue in your message, for example `Summarize https://github.com/monalisa/octokit/issues/1`. + + {% endtip %} + + {% data variables.product.prodname_copilot_short %} responds to your request in the panel. + ## Accessing {% data variables.product.prodname_copilot_chat_short %} from the search bar You can ask {% data variables.product.prodname_copilot_short %} a question about an entire repository by typing your question in the main search box of the repository. diff --git a/data/reusables/copilot/open-copilot.md b/data/reusables/copilot/open-copilot.md new file mode 100644 index 0000000000..abc8866d39 --- /dev/null +++ b/data/reusables/copilot/open-copilot.md @@ -0,0 +1,7 @@ +1. Click the **{% octicon "copilot" aria-hidden="true" %}** {% data variables.product.prodname_copilot %} icon at the top right of the page. + + The {% data variables.product.prodname_copilot_chat %} panel is displayed. To resize the panel, click and drag the top or left edge. + +1. If the panel contains a previous conversation you had with {% data variables.product.prodname_copilot_short %}, click the {% octicon "plus" aria-hidden="true" %} plus sign icon at the top right of the {% data variables.product.prodname_copilot_short %} panel to start a new conversation. + + ![Screenshot of the new conversation button, highlighted with a dark orange outline.](/assets/images/help/copilot/chat-new-conversation-button.png)