No edit summary |
|||
Line 1: | Line 1: | ||
{{autolang}} | {{autolang}} | ||
= fedorapeople. | = fedorapeople.org = | ||
本页涵盖了如何获取并使用您专有的 [http://fedorapeople.org fedorapeople.org] 空间。该站点是一个供贡献人员上传文件的地方。尤其适用于 spec 文件,srpm,patch 以及个人源等等。 | |||
== | == 禁止放置的内容 == | ||
* Do not distribute anything on fedorapeople.org that Fedora itself cannot distribute for legal reasons. Nothing on the [http://fedoraproject.org/wiki/ForbiddenItems ForbiddenItems] list or otherwise non distributable by Fedora. | * Do not distribute anything on fedorapeople.org that Fedora itself cannot distribute for legal reasons. Nothing on the [http://fedoraproject.org/wiki/ForbiddenItems ForbiddenItems] list or otherwise non distributable by Fedora. | ||
Line 26: | Line 26: | ||
# Verify your success. You will see "ssh-rsa" followed by alpha numeric string in "Public SSH Key:" field of your Account Details. | # Verify your success. You will see "ssh-rsa" followed by alpha numeric string in "Public SSH Key:" field of your Account Details. | ||
== | == Common Answers == | ||
* Each Fedora contributor has 2000000 KiB (approximately 1954 MiB) of quota-controlled space. | * Each Fedora contributor has 2000000 KiB (approximately 1954 MiB) of quota-controlled space. | ||
Line 37: | Line 37: | ||
{{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 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 | To copy files from the command line, you can use scp | ||
Line 50: | Line 52: | ||
<pre>setfacl -m u:jkeating:rw file</pre> | <pre>setfacl -m u:jkeating:rw file</pre> | ||
== | == fedora people git hosting support == | ||
fedorapeople.org now has support for hosting git repositories including accessing them via the git:// protocol for anonymous downloads as well as providing | fedorapeople.org now has support for hosting git repositories including accessing them 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 using 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]]. | Here is a quick rundown of how to get started using 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]]. | ||
Line 71: | Line 73: | ||
This creates a ''bare'' repository (i.e. a repository that has no working directory). It contains just the files that are part of the <code>.git</code> directory of a ''non-bare'' git repository (the kind most users are accustomed to seeing). | This creates a ''bare'' repository (i.e. a repository that has no working directory). It contains just the files that are part of the <code>.git</code> directory of a ''non-bare'' git repository (the kind most users are accustomed to seeing). | ||
{{admon/important|Repository name must end with .git| | {{admon/important|Repository name must end with .git|cgit will not list repos that do not end in <code>.git</code>.|}} | ||
Additionally if you wish your repository to show up in the cgit web interface, you must: | |||
<pre> | |||
touch ~/public_git/yourgitrepo.git/git-daemon-export-ok | |||
</pre> | |||
For any repositories you wish to appear there by default. | |||
=== Uploading an existing repository to <code>~/public_git</code> === | === Uploading an existing repository to <code>~/public_git</code> === | ||
Line 84: | Line 94: | ||
The caveats from the previous section apply here as well. | The caveats from the previous section apply here as well. | ||
=== Pushing to your repository === | |||
=== | |||
To push changes from a local repository: | To push changes from a local repository: | ||
Line 105: | Line 114: | ||
=== | === Cloning your repository === | ||
To clone your repository, use a command similar to: | To clone your repository, use a command similar to: | ||
Line 137: | Line 146: | ||
{{admon/tip|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.}} | {{admon/tip|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 [http://fedorapeople.org/cgit cgit] once the project list updates. This happens hourly. | |||
}} | {{admon/tip|Repository description|You can set the description for the repository that is displayed in cgit by editing the <code>description</code> file in your repository.}} | ||
=== | === Shared repository === | ||
If you want to give access to your repository to other users you can do this with ACLs. | If you want to give access to your repository to other users you can do this with ACLs. | ||
Line 169: | Line 161: | ||
[[Category:Infrastructure]] | [[Category:Infrastructure]] | ||
Revision as of 02:19, 23 February 2013
fedorapeople.org
本页涵盖了如何获取并使用您专有的 fedorapeople.org 空间。该站点是一个供贡献人员上传文件的地方。尤其适用于 spec 文件,srpm,patch 以及个人源等等。
禁止放置的内容
- Do not distribute anything on fedorapeople.org that Fedora itself cannot distribute for legal reasons. Nothing on the ForbiddenItems list or otherwise non distributable by Fedora.
- Do not upload your private .ssh keys. While Fedora IT works hard on keeping the servers secure, break ins will happen and private keys uploaded can be downloaded and brute-forced easily these days. Private .ssh keys if found during an audit will be deleted.
Accessing Your fedorapeople.org Space
- You need an active Fedora account
- You must be sponsored in a group (other than the CLA groups)
- You need to generate a ssh key (ssh-keygen -t rsa).
- Upload that ssh key into your Fedora account. To upload, visit this link and select your key file using the Public RSA SSH key field. Normally your key is stored in your home directory under .ssh/id_rsa.pub. The ssh key gets activated an hour after you upload it.
- To connect, use the ssh key you uploaded into your Fedora account:
ssh -i ~/.ssh/id_rsa <your_fedora_id>@fedorapeople.org
This step can also be done via Fedora account.
- While logged in, click on "My Account" on the side bar.
- Select "edit" link next to "Account Details."
- Type the following in the "Public RSA SSH Key:" field:
~/.ssh/id_rsa.pub
- Click the "Save!" button.
- Verify your success. You will see "ssh-rsa" followed by alpha numeric string in "Public SSH Key:" field of your Account Details.
Common Answers
- Each Fedora contributor has 2000000 KiB (approximately 1954 MiB) of quota-controlled space.
- If you run out of space you should: clean up stuff you don't need. If you cannot clean up anything then you should contact fedora infrastructure to raise your quota.
- To make a publicly viewable space, create a
public_html
directory. - Fedora people is NOT to be used for development or creating repositories on. Repositories will need to be created elsewhere and uploaded via scp or rsync.
- DO NOT try to use sudo to install packages you "need." Unless you are in the Infrastructure group, and have gotten approval from sysadmin-main, extra packages are not to be installed on fedorapeople.
- Upload files using scp, sftp, or rsync.
To copy files from the command line, you can use scp
scp /path/to/file your_fedora_username@fedorapeople.org:/home/fedora/your_fedora_username/public_html
- Once uploaded into the users public_html directory the files are available via http 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 jkeating read and write access to
file
:
setfacl -m u:jkeating:rw file
fedora people git hosting support
fedorapeople.org now has support for hosting git repositories including accessing them 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 using 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_fedora_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_fedora_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).
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_fedora_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_fedora_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
Cloning your repository
To clone your repository, use a command similar to:
git clone git://fedorapeople.org/~your_fedora_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_fedora_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_fedora_username.fedorapeople.org/git/repo.git/
Browsing your project via cgit
You can see your project listed in cgit once the project list updates. This happens hourly.
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