This is very convenient but there is one drawback to understand. This
means your password is stored, unencrypted on your hard drive. If
anyone ever gets an access to your machine, he will gain access rights
to all your repos, which can be problematic. This is why the really
good way to do this is to follow [[https://stackoverflow.com/questions/5343068/is-there-a-way-to-skip-password-typing-when-using-https-on-github][these instructions]]:
#+begin_src shell :results output :exports both
git config --global credential.helper cache # remember my password
git config --global credential.helper "cache --timeout=3600" # for one hour at most
#+end_src
With this setup, you will be prompted for your password but it will be
cached in memory and they will not be asked again before an hour.
** Option 2: SSH
My prefered (although more technical) solution is to install SSH, to
create a pair or private/public keys, and to upload your SSH public
key on GitLab. This section provides with information on how to do
this.
*** Installing SSH
**** Linux (debian, ubuntu)
We provide here only instructions for debian-based distributions. Feel
free to contribute to this document to provide up-to-date information
for other distributions (e.g., redhat, fedora).
Run (as root):
#+begin_src sh :results output :exports both
apt-get update ; apt-get install openssh-client
#+end_src
**** Mac OSX
You do not have anything to do as it is installed by default.
**** Windows
You should install the [[https://www.ssh.com/ssh/putty/windows/][Putty]] client. Once it is installed, look for
the section on [[https://www.ssh.com/ssh/putty/windows/puttygen][generating an SSH key]].
*** Setting up SSH on Framagit
Here are [[https://docs.gitlab.com/ee/ssh/][all the official explanations on how to set up your SSH key
on GitLab]]. Alternatively, you may also want to have a look at this
- [[https://github.com/rstudio/cheatsheets/raw/master/rmarkdown-2.0.pdf][R Markdown]] (here is also a [[https://rmarkdown.rstudio.com/][nice step-by-step presentation of Rmarkdown]]),
- The [[https://www.rstudio.com/wp-content/uploads/2015/03/rmarkdown-reference.pdf][R Markdown Reference guide]],
- [[https://github.com/rstudio/cheatsheets/raw/master/data-visualization-2.1.pdf][Data visualization with ggplot2]],
- [[https://github.com/rstudio/cheatsheets/raw/master/data-transformation.pdf][Data transformation with dplyr]]
...
...
@@ -97,52 +96,3 @@ install knitr and ggplot2:
install.packages("knitr")
install.packages("ggplot2")
#+END_SRC
* Installing Git
** Linux (debian, ubuntu)
We provide here only instructions for debian-based distributions. Feel
free to contribute to this document to provide up-to-date information
for other distributions (e.g., redhat, fedora).
Run (as root):
#+begin_src sh :results output :exports both
apt-get update ; apt-get install git
#+end_src
** Mac OSX and Windows
- Download and install Git from the [[https://git-scm.com/downloads][Git website]].
- Optional Git clients (should not be needed if you work within
Rstudio):
- [[https://www.sourcetreeapp.com/][SourceTree]]
- [[https://desktop.github.com/][GitHub Desktop]]
#+BEGIN_QUOTE
[[https://github.com/desktop/desktop/issues/852][Apparently]], this works with GitLab and https.
#+END_QUOTE
* Setting up SSH
There are two ways of synchronizing your local repository with GitLab:
through HTTPS or through SSH. The first one does not require any
particular configuration but you will be regularly prompted for your
GitLab password, which can be quite tedious. To avoid this, the best
solution is to set install SSH, to create a pair or private/public
keys, and to upload your SSH public key on GitLab. This section
provides with information on how to do this.
** Installation
*** Linux (debian, ubuntu)
We provide here only instructions for debian-based distributions. Feel
free to contribute to this document to provide up-to-date information
for other distributions (e.g., redhat, fedora).
Run (as root):
#+begin_src sh :results output :exports both
apt-get update ; apt-get install openssh-client
#+end_src
*** Mac OSX
You do not have anything to do as it is installed by default.
*** Windows
You should install the [[https://www.ssh.com/ssh/putty/windows/][Putty]] client. Once it is installed, look for
the section on [[https://www.ssh.com/ssh/putty/windows/puttygen][generating an SSH key]].
** Setting up SSH on Framagit
Here are [[https://docs.gitlab.com/ee/ssh/][all the official explanations on how to set up your SSH key
on GitLab]]. Alternatively, you may also want to have a look at this