docs icon indicating copy to clipboard operation
docs copied to clipboard

Update copy-ssh-public-key.md

Open nam20485 opened this issue 1 year ago • 10 comments

Add a tip and accompanying alternative command describing the error received when using the prescribed clip command in a PowerShell terminal and provide an alternative command that works correctly and doesn't produce the error.

(Windows 11 frequently uses the new Windows Terminal, which defaults to using the PowerShell command line shell. In the PowerShell command line, the '>' operator is reserved and does not pipe the output of a command, but instead causes an error. In this case, using the 'cat' command and then using the bar operator to pipe it's output to the 'clip' command succeeds without producing the error.)

Why:

Closes: #25909

What's being changed (if available, include any code snippets, screenshots, or gifs):

The clip command for Windows users to copy their SSH key to the clipboard for adding to their GitHub account. (Step 1 of the "Adding a new SSH key to your account" section)

image

Check off the following:

  • [x] I have reviewed my changes in staging, available via the View deployment link in this PR's timeline.

    • For content changes, you will also see an automatically generated comment with links directly to pages you've modified. The comment won't appear if your PR only edits files in the data directory.
  • [x] For content changes, I have completed the self-review checklist.

nam20485 avatar Jun 10 '23 21:06 nam20485

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

welcome[bot] avatar Jun 10 '23 21:06 welcome[bot]

Adfgjkk

nohaaaaa18 avatar Jun 11 '23 07:06 nohaaaaa18

Wtuioppj is

nohaaaaa18 avatar Jun 11 '23 07:06 nohaaaaa18

Seguin and the course

nohaaaaa18 avatar Jun 11 '23 07:06 nohaaaaa18

@nam20485 Thank you for opening a PR and linking it to your issue! ✨

And thanks for the screenshot and context! I'll get this triaged for review! :zap:

cmwilson21 avatar Jun 12 '23 13:06 cmwilson21

Hi @nam20485, thanks so much for opening this! ✨

Do you know if using the | pipe would actually work for all Windows users, even those using command prompt and older versions of Powershell? It looks like that should work and, if so, I think we should just replace the current Windows example. That would make this a lot simpler.

If not, or I've misunderstood, your changes still look good, I'd just suggest combining your {% tip %} block with the other one that's suggesting using clip.exe. There's a good example in this article. Let me know if you have any questions!

guntrip avatar Jun 12 '23 15:06 guntrip

Do you know if using the | pipe would actually work for all Windows users, even those using command prompt and older versions of Powershell? It looks like that should work and, if so, I think we should just replace the current Windows example.

@stevecat Good question. I thought the same thing, but my testing shows that is not the case unfortunately. The new command I created does not work on Command Prompt (cmd.exe).

So I think that we have to leave the existing one and add the alternative command.

I will make a commit that updates my PR to use the "notes" approach that you suggested.

nam20485 avatar Jun 12 '23 18:06 nam20485

@stevecat I think its ready for your review again- I committed a change to use a Notes section with two bullet points instead of two tips in a row. Let me know if you need any other changes.

nam20485 avatar Jun 13 '23 00:06 nam20485

حسنا صديقي يمكنك بالتعديل على هذه النقطه الذي كنت اعلق عليها اكتب جمله مفيده الى اصدقائي والموجودين واكون ممنونك شكرا جزيلا لك صديقي

في الثلاثاء، ١٣ يونيو ٢٠٢٣, ٣:٣٨ ص Nathan Miller @.***> كتب:

@stevecat https://github.com/stevecat I think its ready for your review again- I committed a change to use a Notes section with two bullet points instead of two tips in a row. Let me know if you need me to make any other changes.

— Reply to this email directly, view it on GitHub https://github.com/github/docs/pull/25911#issuecomment-1588295762, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7EAFFABIVT4BVVUAXJNM3LXK6Y73ANCNFSM6AAAAAAZB42XVM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Obeda1995 avatar Jun 13 '23 02:06 Obeda1995

Hi again @nam20485, that looks great, thank you! ✨

Unfortunately, our site isn't doing a very good job of rendering your changes:

image

I don't think this is related to your changes. I can reproduce the raw markdown if I remove everything from the note block. It's likely a specific combination of indentation and reusables 😅 I've raised an issue with our engineering team and once this is resolved, I'll circle back here to merge your pull request.

guntrip avatar Jun 14 '23 08:06 guntrip

That's still rendering strangely. Let me ask our engineering team to take another look.

guntrip avatar Aug 11 '23 11:08 guntrip

Everything looks good!

https://docs-25911-1f56bc.preview.ghdocs.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account#adding-a-new-ssh-key-to-your-account

Thanks all for your patience!

gracepark avatar Aug 11 '23 16:08 gracepark

Wonderful, thank you so much @gracepark!!

guntrip avatar Aug 11 '23 16:08 guntrip

Automatically generated comment ℹ️

This comment is automatically generated and will be overwritten every time changes are committed to this branch.

The table contains an overview of files in the content directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the data directory will not show up in this table.


Content directory changes

You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.

Source Preview Production What Changed
authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account.md fpt
ghec
ghes@ 3.10 3.9 3.8 3.7 3.6
ghae
fpt
ghec
ghes@ 3.10 3.9 3.8 3.7 3.6
ghae

fpt: Free, Pro, Team ghec: GitHub Enterprise Cloud ghes: GitHub Enterprise Server ghae: GitHub AE

github-actions[bot] avatar Aug 11 '23 16:08 github-actions[bot]

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues :zap:

github-actions[bot] avatar Aug 11 '23 17:08 github-actions[bot]

That was so great , You all are so so hard working and pros , I ... loved reading this discussion ╰(°▽°)╯ congratulations @nam20485 sir 🌟 and @gracepark mam and @stevecat sir so amazing. 🌟🌟(❁´◡`❁) ... I am new and i wish i will be some nearby of this much knowledge one day .

GaganHonor avatar Aug 12 '23 05:08 GaganHonor

Cool! No worries @stevecat, I thought it went pretty smoothly. I'm really excited to have been able to make a contribution to this site. Thanks to you and @gracepark for helping me out with it.

nam20485 avatar Aug 12 '23 21:08 nam20485