or should both the SSH and the HTTPS links be in the guide with a short explanation?
Here is how I stumbled:
PS> git push -u origin fix-5270-unable-to-initialise-rps
firstname.lastname@example.org: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
First some googling to figure out that git push was telling me that it couldn’t find the SSH certificate files for my repository. Then some additional googling to figure why git tried to make an SSH certificate-based connection instead of using the Git Credential Manager - especially because I had no problem seeing my repository in Visual Studio Code. I almost made a set of certificate keys when I finally realised the root cause and found the right solution (for me):
Yes, you can push using HTTPS on all platforms (to my best knowledge). Your are however being asked for credentials on every push unless you use one of the many credential managers.
Git for Windows comes with a credential manager that seamlessly integrates with Git Gui, Git Bash, PowerShell, CMD, Visual Studio Code etc.. All you need is to sign in once and approve access; very similar to establishing a GoogleDrive remote in rclone. It takes much more time and skills to setup SSH on Windows, so the choice is easy for me.
I will send a pull request one of the coming days. Right now I am leaning towards changing the add origin to HTTPS and then adding something like this at the end of the pull request chapter:
If you wish to use SSH when connecting to GitHub, then change your URL like this: