geco-bern / agds

Applied Geodata Science book. Developed for the lecture(s) with the same name at the Institute of Geography, University of Bern.
https://geco-bern.github.io/agds/
Other
5 stars 6 forks source link

Issues connecting an R project with Git repo #148

Open pepaaran opened 11 months ago

pepaaran commented 11 months ago

A student had a problem dealing with the SSH connection to their GitHub account. After cloning the repository via the RStudio interface, with the repository url, they had to introduce a password to push commits. The SSH connection that they set up with their laptop was not recognized. A quick fix is to follow this workflow, which clones the repository via SSH, instead of the URL.

  1. Create a repository on GitHub.
  2. Clone the repository via the terminal, running git clone git@github.com:yourusername/repositoryname.git. This will create a new folder in your laptop named repositoryname.
  3. Go to RStudio and create a new project, from "an existing directory" and browse to the folder you created in the previous step.
  4. Check the connection by making some change, commiting it and pushing it. Then check on the browser if you can see the changes.