Page MenuHomec4science

Create a simple repository
Updated 1,096 Days AgoPublic

Here you will learn how to create a simple repository and handle permissions

Creating a repository on c4science

  • Go to the Diffusion application
  • On the top right, click on Create Repository
  • Choose to create a Git (preferred), SVN or Mercurial repository

  • All you need to indicate in the next screen is a name for your repository

Let's set some policies

Default policies are access to repository author only. You may want to edit that. The first step is to define the visibility of the repository. There are several fine grain options to adjust the visibility.

Visible means read access, Editable means manage (via the web interface), Pushable is access to the repo in write mode.

Other options are in particular: "Public", which will make the repository accessible to anyone (even logged out) and "All Users" are all logged-in registered users of c4science.

  • We wish to give read access to some individual users. For that, we have to create a custom policy

...we can just add some users to the Allow list:

You can also set similar policies for Edit (this means: managers of the repository) and Push (this means contributors).

Let's have a look at your repository

click on View Repository.

You can see access URLs for https (you need a VCS password for this) and ssh (you need to upload a SSH key for this), Those are the URLs to be put after git clone in your command line. The Manage Repository link will take you back to the configuration menu.

Using your repository

Now that your repository is set up, you can clone it to your machine with the command

git clone https://c4science.ch/diffusion/997/simplegitrepo.git.

Replace https://c4science.ch/diffusion/997/simplegitrepo.git with the URL shown in your actual repository. You will need to enter your c4science username and the VCS password or configure ssh properly if needed.

You can then enter the newly created directory and create, for example, a README.md file. Then, add the file

git add README.md

commit your changes

git commit -m "README.md file added"

and push everything to the server

git push

...after some time (less than a minute), you can see the files on the web interface.

NOTE: If you want to manage access from multiple people, you may want to use a Project
Last Author
aubort
Last Edited
Apr 19 2021, 11:21

Event Timeline

rezzonico created this document.Sep 13 2016, 22:26
rezzonico edited the content of this document. (Show Details)
rezzonico edited the content of this document. (Show Details)
fourestey edited the content of this document. (Show Details)Sep 13 2016, 22:49
rezzonico edited the content of this document. (Show Details)Sep 15 2016, 21:36
rezzonico edited the content of this document. (Show Details)Sep 15 2016, 21:41
rezzonico edited the content of this document. (Show Details)
rezzonico edited the content of this document. (Show Details)Oct 18 2016, 09:26
aubort changed the edit policy from "c4science (Project)" to "Restricted Project (Project)".Dec 16 2016, 16:52
aubort edited the content of this document. (Show Details)Mar 15 2017, 16:56
aubort edited the content of this document. (Show Details)Apr 10 2017, 11:32
aubort added a project: c4science.
aubort edited the content of this document. (Show Details)Apr 27 2017, 10:25
ajdelalo removed a subscriber: ajdelalo.
aubort edited the content of this document. (Show Details)Aug 6 2018, 13:26
aubort edited the content of this document. (Show Details)Aug 6 2018, 13:30
aubort edited the content of this document. (Show Details)Apr 7 2020, 11:07
aubort edited the content of this document. (Show Details)Apr 19 2021, 11:21