docs
docs copied to clipboard
Provide better working copy SSH key clip command that doesn't fail on PowerShell
Code of Conduct
- [X] I have read and agree to the GitHub Docs project's 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
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.
قفف
@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:
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! 🎉
Helpfull
@cmwilson21 Thanks, no problem. Happy to help out!