If you have just created your first project on the SESYNC GitLab server and tried to push files to it for the first time, you might see a confusing message saying that you need to generate an SSH key so that you can push updates from your local clone of the repository to the GitLab server with the SSH protocol. You might want to do this so that you never have to enter a username and password to push commits. The SSH key takes the place of the username and password, but you need to register your local key with the remote repository first.
You can generate a key pair for any machine onto which you will clone your repository, but SESYNC makes it especially easy to use the SSH protocol for projects cloned to our RStudio Server from GitLab or GitHub.
system('git remote set-url origin email@example.com:USERNAME/REPOSITORYNAME.git'). Here,
USERNAMEwill either be your GitHub username or the GitHub organization the repo belongs to.
system('git remote set-url origin firstname.lastname@example.org:USERNAME/REPOSITORYNAME.git'). Here,
USERNAMEwill either be your SESYNC username or the GitLab group the repo belongs to.
That’s it! You should be able to push and pull between your local git repository on https://rstudio.sesync.org and the remote git repository on GitLab/GitHub.
You might also want to set up SSH push/pull access on your local machine. This will need to be done in addition to setting it up on the RStudio server. The procedure is basically the same as above, but you may need to create an SSH key and save it to the appropriate directory on your machine.
C:\Users\<your username>\.ssh\id_rsa. You do not need to include a passphrase.
Screenshot of Step 4