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
git@github.com: 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):
I thought you could only read from https repositories but maybe you can push now-a-days too? Does that work with the CLI do you know? Not at computer right now, but I can try tomorrow.
It is really useful to have a new user perspective on this.
You could send a Pull request to update CONTRIBUTING.md
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:
On unix platforms ssh keys are relatively easy (but not trivial!) to set up.
I don't know how the push credentials works on the command line with https.
Or we could show both with a # comment so
# Use this if you have an ssh key setup with GitHub
git remote add origin git@github.com:YOURUSER/rclone.git
# Use this otherwise
git remote add origin https://github.com/YOURUSER/rclone.git