docs icon indicating copy to clipboard operation
docs copied to clipboard

Provide better working copy SSH key clip command that doesn't fail on PowerShell

Open nam20485 opened this issue 1 year ago • 7 comments

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.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

The Adding a new SSH key to your account section of the Add a new SSH Key page at the path Authentication \ Connect with SSH

What part(s) of the article would you like to see updated?

The 'clip' command from step 1 of the "Adding a new SSH key to your account" section...

On Windows 11 and some Windows 10 systems, Windows Terminal has replaced the cmd.exe as the default terminal. Windows Terminal uses the PowerShell shell by default. The provided 'clip' command for Windows will result in an error because the '<' operator does not function the same in PowerShell. It does not pipe output of the command following it to the command preceding it, but instead produces an error (see screenshot below) stating:

"ParseError: The '<' operator is reserved for future use."

For many of the users who do not understand the error message or have an advanced understanding of shell command syntax, the error will result in them not being able to copy the SSH key to add to their GitHub account, and they will have to go searching Google for a method that will work, or worst-case, giving up.

Providing the alternative, working command will allow these users to successfully complete the step, quickly and easily.

Alternatively, you could replace the first command with the one I provided, as I believe it will work successfully in more user cases than the provided one.

Additional information

image

nam20485 avatar Jun 10 '23 21:06 nam20485

Thanks for opening this issue. 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]

قفف

nohaaaaa18 avatar Jun 11 '23 14:06 nohaaaaa18

@nam20485 Thanks so much for opening an issue! We appreciate all this context 👍

I'll triage this for the team to take a look :eyes:

cmwilson21 avatar Jun 12 '23 13:06 cmwilson21

Whoops! Just saw you submitted a PR, too. So I'm going to triage the PR for review first. Thanks for opening an issue and linking it to your PR! 🎉

cmwilson21 avatar Jun 12 '23 13:06 cmwilson21

Helpfull

HarryWest23 avatar Jun 12 '23 15:06 HarryWest23

@cmwilson21 Thanks, no problem. Happy to help out!

nam20485 avatar Jun 13 '23 00:06 nam20485