From Fedora Project Wiki

< Infrastructure‎ | fedorapeople.org

Revision as of 06:50, 7 June 2019 by Mythcat (talk | contribs) (add content ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

fedorapeople.org

Această pagină acoperă detaliile despre modul de obținere și utilizare a datelor personale spațiu pe fedorapeople.org, un site unde Fedora contribuitorii pot încărca fișierele pe care să le împărtășească cu lumea. Este perfect pentru încărcarea specfiles, SRPMs, patch-uri sau depozite personale Git.

Conținut interzis

  • NU distribuiți nimic pe fedorapeople.org că Fedora însăși nu poate distribui din motive legale. Nimic din lista ForbiddenItems sau altfel nu poate fi distribuită de Fedora.
  • NU încărcați cheile private ssh. În timp ce echipa de infrastructură Fedora lucrează din greu la menținerea securității serverelor, se vor întâmpla pauze și cheile private încărcate pot fi descărcate și ușor forțate. Cheile private .ssh găsite în timpul unui audit vor fi șterse.

Accesarea spațiului dvs. fedorapeople.org

  1. Aveți nevoie de un cont activ cont Fedora
  2. Trebuie să faceți parte din cel puțin un grup (altul decât grupul CLA) din sistemul de cont Fedora. Adesea adnotat ca CLA + 1
  1. Trebuie să generați o cheie ssh (ssh-keygen -t rsa).
  2. Încărcați cheia ssh în contul dvs. Fedora. Pentru a încărca, accesați acest link și selectați fișierul cheie utilizând câmpul Public RSA SSH . De multe ori, cheia dvs. publică poate fi găsită în directorul dvs. de domiciliu sub ".ssh / id_rsa.pub". Tasta ssh va fi activată la o oră după încărcare.
  3. Pentru a vă conecta, utilizați cheia ssh pe care ați încărcat-o în contul dvs. Fedora:
     ssh -i ~ / .ssh / id_rsa <numele dvs.> @ fedorapeople.org </ pre>

{{admon/important | Updating your SSH public key | If you want to update your SSH public key in fedorapeople.org, do NOT manually edit your .ssh/authorized_keys file. Go through [https://admin.fedoraproject.org/accounts/user/edit the usual FAS account edit page] and wait for it to be updated, or you will be locked out of your account.}} == Răspunsuri frecvente == * Fiecare contribuitor al Fedora are un spațiu controlat de cote de 2000000 KiB (aproximativ 1954 MiB). * Dacă nu mai aveți spațiu, trebuie să curățați fișierele de care nu aveți nevoie. Dacă nu puteți să curățați nimic, trebuie să contactați Fedora Infrastructure pentru a vă ridica cota. * Pentru a crea un spațiu public vizibil, creați un director <code> public_html </ code>. * Persoanele Fedora NU vor fi folosite pentru a crea sau a crea un depozit. Depozitele vor trebui create în altă parte și încărcate prin intermediul scp sau rsync. * NU încercați să utilizați sudo pentru a instala pachetele de care aveți nevoie. Dacă nu sunteți în grupul Infrastructură și ați obținut aprobarea de la sysadmin-main, pachetele suplimentare nu trebuie instalate pe fedorapeople. * Încărcați fișiere utilizând scp, sftp sau rsync. {{admon / tip | Utilizând Nautilus | Dacă utilizați GNOME, vizitați [[Infrastructure / fedorapeople.org / Connecting_with_Nautilus | această pagină]] pentru o modalitate simplă de conectare la spațiul fedorapeople.org.}} {{admon/tip | Using Dolphin or Konqueror | If you use KDE, type <code>sftp://your_username@fedorapeople.org</code> in your file manager address bar for an easy way to connect to your fedorapeople.org space.}} {{admon/tip | Using Thunar | If you use XFCE, type <code>ctrl+l</code> to bring up the Open Location Dialogue and then enter <code>sftp://your_username@fedorapeople.org/home/fedora/your_username</code> in Location field for an easy way to connect to your fedorapeople.org space. PCManFM also works}} To copy files from the command line, you can use scp <pre> scp /path/to/file your_username@fedorapeople.org:/home/fedora/your_username/public_html


  • Once files are uploaded into the user's public_html directory, the files will become available at: http://your_username.fedorapeople.org/.
  • Give other users access to read/write/etc files by using extended acls. Read man pages for setfacl and getfacl for adding them to your dirs/files. This gives the user "your_username" read and write access to file:
setfacl -m u:your_username:rw file

fedora people git hosting support

fedorapeople.org now has support for hosting git repositories. This includes access via the git:// protocol for anonymous downloads as well as providing the cgit web interface.

Here is a quick rundown of how to get started with git on fedorapeople.org. It assumes that you are already somewhat familiar with git. You might want to take a look at the Git quick reference.

Create a ~/public_git directory on fedorapeople.org

ssh your_username@fedorapeople.org "mkdir ~/public_git; /sbin/restorecon -Rv ~/public_git"

Creating a new git repository in ~/public_git

As an example, here is one method to create an empty repository on your local system and upload it:

git init --bare repo.git
scp -r repo.git/ your_username@fedorapeople.org:~/public_git/

This creates a bare repository (i.e. a repository that has no working directory). It contains just the files that are part of the .git directory of a non-bare git repository (the kind most users are accustomed to seeing).

Important.png
Repository name must end with .git
cgit will not list repos that do not end in .git.

Additionally if you wish your repository to show up in the cgit web interface, you must:

touch ~/public_git/yourgitrepo.git/git-daemon-export-ok

For any repositories you wish to appear there by default.

Uploading an existing repository to ~/public_git

If you have an existing repository you want to use on fedorapeople, you can do so easily:

git clone --bare /path/to/local/repo repo.git
scp -r repo.git/ your_username@fedorapeople.org:public_git/

The caveats from the previous section apply here as well.

Pushing to your repository

To push changes from a local repository:

cd /path/to/local/repo
git remote add fedorapeople your_username@fedorapeople.org:public_git/repo.git
git push --mirror fedorapeople

This creates a mirror of your local repository. All of the branches and tags in the local repository will be pushed to the fedorapeople repository.

If you only want to push selected branches, amend the git push example. For example, to push only your local master branch:

git push fedorapeople master


Idea.png
Allowing others to push
You can allow other fedorapeople.org users to push to your repository using extended acls (see setfacl(1) for details). However, if you have many others working on your project, using Pagure is strongly preferred.

Cloning your repository

To clone your repository, use a command similar to:

git clone git://fedorapeople.org/~your_username/repo.git


It is also possible to clone your project via the http:// protocol. In order for this to work, you must arrange to have git-update-server-info run whenever you update your repository. Typically, this is done with a post-update hook script. However, the user home directories on fedorapeople.org are mounted with the noexec option, which prevents the script from running. Instead, you may create a symbolic link to git-update-server-info in the hooks directory of your repository:

ssh your_username@fedorapeople.org
cd ~/public_git/repo.git/hooks
ln -svbf $(git --exec-path)/git-update-server-info post-update
git update-server-info


You also need to create a link from ~/public_html/git to ~/public_git:

cd ~/public_html
ln -svbf ../public_git git


You can clone your repository over http:// with a command similar to:

git clone http://your_username.fedorapeople.org/git/repo.git/


Idea.png
git:// versus http://
Only clone via http:// if you are behind a firewall that prevents git:// from working. The git:// protocol is faster and more efficient than the http:// protocol for git usage.

Browsing your project via cgit

You can see your project listed in cgit once the project list updates. This happens hourly.


Idea.png
Repository description
You can set the description for the repository that is displayed in cgit by editing the description file in your repository.

Shared repository

If you want to give access to your repository to other users you can do this with ACLs.

 setfacl -R -m u:<user>:rwX <repo.git>
 find <repo.git> -type d | xargs setfacl -R -m d:u:<user>:rwX


Enable per-repo upload-archive

If you want to allow your repository to be accessible via git archive --remote , you will need to set set the following in your repostiory's config file:

  [daemon]   
  uploadarch = true

Policies

Viruses

Fedorapeople.org servers are regularly scanned for viruses, including people's home directories, because of the nature of providing download of user-uploaded files on a Fedora domain name. As soon as a virus is reported by the scanners, they will be scanned again by another scanner to make sure they're actual viruses (and not just an overly active scanner). If the second opinion also reports the file as being a virus, the file will be moved to a non-public facing directory, and the owner will be notified. If the user has not yet responded after a week, the file will be deleted.