Version 4 vs 14
Version 4 vs 14
Edits
Edits
- Edit by aubort, Version 14
- Apr 19 2021 11:21
- Edit by • rezzonico, Version 4
- Sep 15 2016 21:36
Edit Older Version 4... | Edit Current Version 14... |
Content Changes
Content Changes
**Here you will learn how to create a simple repository and handle permissions**
Click on the //Create a new repository// button on your landing page.
{F135915}
Choose to create a Git repository
{F135917}
All you need to indicate in the next screen is a name for your repository
{F135919}
Now, let's set some policies
{F135921}
Default policies are quite liberal, we will have to edit that. The first step is to define the visibility of the repository. There are several fine grain options to adjust the visibility. In Phabricator, it is not possible to make a repository explicitely private. **In order to make a repository private**, one needs to specifically set a custom policy in order to add allowed users.
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.
{F135924}
We wish to give read access to some individual users. For that, we have to create a custom policy
{F135927}
...we can just add some users to the //Allow// list:
{F135929}
You can also set similar policies for Edit (this means: managers of the repository) and Push (this means contributors).
{F135931}
Now, you can go back to //Basics// and //Activate Repository//.
{F135933}
Let's have a look at your repository now by clicking on //View Repository//.
{F135936}
You can see access URLs for https (you need a [[ https://c4science.ch/w/c4science/whatisvcs/ | 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.
{F135944}
**Here you will learn how to create a simple repository and handle permissions**
# Creating a repository on c4science
* Go to the [[/diffusion/|Diffusion]] application
* On the top right, click on Create Repository
* Choose to create a Git (preferred), SVN or Mercurial repository
{F135917}
* All you need to indicate in the next screen is a name for your repository
{F135919}
## Let's set some policies
{F135921}
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.
{F211261}
* We wish to give read access to some individual users. For that, we have to create a custom policy
{F135927}
...we can just add some users to the //Allow// list:
{F135929}
You can also set similar policies for Edit (this means: managers of the repository) and Push (this means contributors).
{F135931}
## Let's have a look at your repository
click on //View Repository//.
{F135936}
You can see access URLs for https (you need a [[ https://c4science.ch/w/c4science/whatisvcs/ | VCS password]] for this) and ssh (you need to [[c4science/sshkeys/|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.
{F135944}
# 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 [[c4science/Project]]
**Here you will learn how to create a simple repository and handle permissions**
Click on the //# Create a newing a repository// button on your landing page. on c4science
{F135915}
* Go to the [[/diffusion/|Diffusion]] application
* On the top right, click on Create Repository
* Choose to create a Git (preferred), SVN or Mercurial repository
{F135917}
* All you need to indicate in the next screen is a name for your repository
{F135919}
Now, l## Let's set some policies
{F135921}
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.
Default policies are quite liberal, we will have to edit that. The first step is to define the visibility of the repository. There are several fine grain options to adjust the visibility. In Phabricator, it is not possible to make a repository explicitely private.Visible means read access, **In order to make a repository private**Editable means manage (via the web interface), one needs to specifically set a custom policyPushable is access to the repo in order to add allowed userswrite 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.
{F135924}{F211261}
* We wish to give read access to some individual users. For that, we have to create a custom policy
{F135927}
...we can just add some users to the //Allow// list:
{F135929}
You can also set similar policies for Edit (this means: managers of the repository) and Push (this means contributors).
{F135931}
## Let's have a look at your repository
click on //View Repository//.
{F135936}
You can see access URLs for https (you need a [[ https://c4science.ch/w/c4science/whatisvcs/ | VCS password]] for this) and ssh (you need to [[c4science/sshkeys/|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.
{F135944}
# 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`
Now, you can go back to //Basics// and //Activate Repository//.commit your changes
{F135933}`git commit -m "README.md file added"`
Let's have a look at your repository now by clickand push everything on //View Repository//.to the server
{F135936}`git push`
You can see access URLs for https (you need a [[ https://c4science.ch/w/c4science/whatisvcs/ | 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....after some time (less than a minute), The //Manage Repository// link will take you back toyou can see the files on the configuration menuweb interface.
{F135944}NOTE: If you want to manage access from multiple people, you may want to use a [[c4science/Project]]
c4science · Help