Reprepro是一款小巧的命令行工具来方便地创建并管理.deb仓库。今天我们会展示给你如何使用reprepro简单地创建一个Debian包仓库,并使用rsync上传到Sourceforge.net。
步骤 1: 安装Reprepro并生成key
首先,安装所有需要的包,使用下面的apt-get命令。
$ sudo apt-get install reprepro gnupg
现在你需要使用gnupg生成一个gpg key,这里使用下面的命令。
$ gpg --gen-key
它会询问你一些问题,比如你想要哪种key、key的有效期、如果你不知道如何回答,只需点击回车 来选择默认选项(建议)
当然,它会询问你用户名和密码,在脑海中记住这些,因为我们会在之后需要它。
gpg (GnuPG) 1.4.14; Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
Your selection?
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
Requested keysize is 2048 bits
Please specify how long the key should be valid.
0 = key does not expire
= key expires in n days
w = key expires in n weeks
m = key expires in n months
y = key expires in n years
Key is valid for? (0)
Key does not expire at all
Is this correct? (y/N) Y
You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
"Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"
Real name: ravisaive
Email address: tecmint.com@gmail.com
Comment: tecmint
You selected this USER-ID:
"Ravi Saive (tecmint) <tecmint.com@gmail.com>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
+++++
gpg: key 2EB446DD marked as ultimately trusted
public and secret key created and signed.
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
pub 2048R/2EB446DD 2014-06-24
Key fingerprint = D222 B1C9 342E 5911 02B1 9147 3BD6 7918 2EB4 46DD
uid Ravi Saive (tecmint) <tecmint.com@gmail.com>
sub 2048R/7EF2F750 2014-06-24
现在你的key已经生成了,要检查一下,用root权限运行这条命令。
$ sudo gpg --list-keys
示例输出
/home/ravisaive/.gnupg/pubring.gpg
via: <http://www.tecmint.com/create-deb-pacakge-repository-in-ubuntu/>
译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
发表回复