Commit 01006556 authored by jkvis's avatar jkvis

Changed the remotes lecture based on our discussion

parent c2a34d80
......@@ -9,7 +9,7 @@
\providecommand{\myGroup}{}
\providecommand{\myDepartment}{Department of Human Genetics}
\providecommand{\myCenter}{}
\providecommand{\date}{6-9-2017}
\providecommand{\date}{22-11-2017}
\usetheme{lumc}
......@@ -228,29 +228,13 @@ $ git push origin master -u
\section{Remote protocols}
\subsection{Remote protocols}
\begin{pframe}
Git can use four major protocols to transfer data:
Git can use two major protocols to transfer data:
\begin{itemize}
\item Local
\item HTTP(S)
\item SSH
\item Git protocol
\end{itemize}
\end{pframe}
\subsection{The local protocol}
\begin{pframe}
Used when the remote repository is in another directory on the same
machine.
\begin{lstlisting}
$ git clone /opt/git/project.git
\end{lstlisting}
or
\begin{lstlisting}
$ git clone file:///opt/git/project.git
\end{lstlisting}
\end{pframe}
\subsection{The HTTP(S) protocol}
\begin{pframe}
Most popular protocol when the remote repository is on a server.
......@@ -273,16 +257,6 @@ $ git clone user@example.com:gitproject.git
This usually requires public/private key authentication.
\end{pframe}
\subsection{The Git protocol}
\begin{pframe}
Originally the best performing protocol.
\begin{lstlisting}
$ git clone git://example.com/gitproject.git
\end{lstlisting}
Only for fetching and often blocked by the institute firewall.
\end{pframe}
\section{Remotes on GitLab}
\subsection{Using a central server}
\begin{pframe}
......@@ -322,6 +296,56 @@ $ git clone git://example.com/gitproject.git
You can choose to use the HTTPS or the SSH protocol.
\end{pframe}
\subsection{GitLab Projects}
\begin{pframe}
Every project belongs to a single namespace, either a:
\begin{itemize}
\item User:
\begin{itemize}
\item The project owner has direct control over the project.
\end{itemize}
\item Group:
\begin{itemize}
\item The group's user-level permissions will take effect.
\end{itemize}
\end{itemize}
\medskip
Every project has a visibility level:
\begin{itemize}
\item A way of controling who has \textbf{read} access to that project.
\item Note that this controls both git ``fetch'' access as well as access to the web UI for that project.
\end{itemize}
\end{pframe}
\subsection{Project visibility levels}
\begin{pframe}
\begin{itemize}
\item Private projects:
\begin{itemize}
\item The project owner must explicitly grant access to specific users.
\item Are not listed on the public access directory.
\end{itemize}
\end{itemize}
\begin{itemize}
\item Internal projects:
\begin{itemize}
\item Can be cloned by any logged in user.
\item Are listed on the public access directory for logged in users.
\item Logged in users have Guest permissions on the repository.
\end{itemize}
\end{itemize}
\begin{itemize}
\item Public projects:
\begin{itemize}
\item Can be cloned without any authentication.
\item Are listed on the public access directory.
\item Logged in users have Guest permissions on the repository.
\end{itemize}
\end{itemize}
\end{pframe}
\makeAcknowledgementsSlide{
\begin{tabular}{l}
\acknowledgements
......
......@@ -86,4 +86,37 @@ Now make another commit locally and push it to the GitLab server. Verify that
all these changes are now present both on your local machine and on the GitLab
server.
\subsubsection*{Collaboration}
In this practical, you'll work with both your repository and with the repository your neighbour created
during the previous practical. We'll refer to this repository as {\bf N}, and
to your own repository from the previous practical as {\bf Y}. Note that by now both repositories should have a
corresponding GitLab project (a remote repository).
\bigskip
Make sure that your GitLab project \textbf{Y} is private and add your colleague as a member to it as \textbf{Guest}.
\bigskip
Try to \textbf{clone} his or her repository to your local machine. Make sure to do this in a separate directory.
\begin{itemize}
\item \emph{Question:} Was the cloning successful? Try to identify why.
\end{itemize}
Change the role of your neighbour from \textbf{Guest} to \textbf{Developer} and try to \textbf{clone} his repository again once your neighbour made you a \textbf{Developer}.
\bigskip
Edit locally a file from your neighbour \textbf{N} directory, stage it, commit it, and try to \textbf{push}.
\begin{itemize}
\item \emph{Question:} Were you able to push? Try to identify why.
\end{itemize}
Change your neighbour's role in your GitLab project from \textbf{Developer} to \textbf{Master}.
\bigskip
After your neighbour upgraded your role to \textbf{Master} try to push again your changes to his GitLab repository.
\medskip
Inspect the commit graph on GitLab.
\end{document}
\providecommand{\courseTitle}{Code and data management with Git}
\providecommand{\myDate}{06-09-17}
\providecommand{\myDate}{22-11-2017}
\providecommand{\acknowledgements}{
Martijn Vermaat\\
Wibowo Arindrarto\\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment