You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+55-13
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,10 @@ You may also pass the path to the configuration file on the command line:
68
68
69
69
$ cheeseshop /path/to/cheeseshop.yml
70
70
71
-
This configuration file should look like this:
71
+
Configuration
72
+
-------------
73
+
74
+
The configuration file should look like this:
72
75
73
76
# The root directory for packages
74
77
root: /home/cheeseshop
@@ -91,30 +94,69 @@ This configuration file should look like this:
91
94
spam: acbd18db4cc2f85cedef654fccc4a4d8
92
95
eggs: 37b51d194a7513e45b56f6524f2d51f2
93
96
94
-
To compute MD5 sum for a given password, in order to fill the authentication file, you may type following command :
97
+
There is a sample configuration in file *etc/cheeseshop.yml* of the archive.
95
98
96
-
$ echo -n foo | md5sum
97
-
acbd18db4cc2f85cedef654fccc4a4d8 -
98
-
$ echo -n bar | md5sum
99
-
37b51d194a7513e45b56f6524f2d51f2 -
99
+
### root
100
100
101
-
There is a sample configuration file in *etc* directory of the archive.
101
+
The root directory is where live the Python packages. Under this root there is a directory for each package. Files for versions of this package are in these subdirectories. Thus, if our repository hosts packages *spam* (in versions *1.0.0* and *1.1.0*) and *eggs* (in versions *1.0.0* and *1.0.1*) we would have following directory structure :
102
102
103
-
Of course, you must create an empty directory for the repository. Ensure that the user running CheeseShop has a right to write in this directory.
103
+
$ tree
104
+
.
105
+
├── spam
106
+
│ ├── spam-1.0.0.tar.gz
107
+
│ └── spam-1.1.0.tar.gz
108
+
└── eggs
109
+
├── eggs-1.0.0.tar.gz
110
+
└── eggs-1.0.1.tar.gz
104
111
105
-
To disable HTTP or HTTPS, you must set port to *0*. If HTTPS is disabled, you don't have to set certificate and key paths. To disable basic authentication, you must set auth to `~` (which means none in YAML).
112
+
You must create this directory and ensure that user running the server has a right to write in this directory.
106
113
107
-
To generate a key, you can use openssl as follows:
114
+
It is highly advised to backup this directory.
115
+
116
+
### key
117
+
118
+
This is the path to the CheeseShop private key. To generate such a key, you might type:
108
119
109
120
$ openssl genrsa -out cheeseshop-key.pem 2048
110
121
111
-
To generate au self signed certificate, you can type:
122
+
This will generate a file *cheeseshop-key.pem* that you should copy in directory */etc/ssl/private*, which is the standard place.
123
+
124
+
This is only necessary when running HTTPS server. If you run only HTTP, you may set this value to *~*.
125
+
126
+
### cert
127
+
128
+
This is the path to the CheeseShop certificate. To generate a self signed certificate, you can type:
This command will ask you many fields, but the only that is necessary is the *FQDN* which is the hostname of the machine that is running CheeseShop.
132
+
This command will ask you many fields, but the only that is necessary is the *FQDN* which is the hostname of the machine that is running CheeseShop. A file named *cheeseshop-cert.pem* will be generated; you should copy this file in directory */etc/ssl/certs*, which is the standard place.
133
+
134
+
Note that if you have a certificate generated by a Certification Authority, you might not have to add a *trusted-host* in your PIP configuration. But I have such certificate and was unable to test it.
135
+
136
+
### http
137
+
138
+
This the port number that HTTP server will listen for incoming connections. Set it to *0* to disable HTTP (and run only on HTTPS). Note that it is not a good idea to perform basic authentication on HTTP, as anybody that intercepts HTTP requests might know you username and password. Standard port for HTTP is *80* but the server must run as root to be able to listen on this port. If you don't run the server as root, you must listen on a port number greater than *1024*.
139
+
140
+
### https
141
+
142
+
This is the port number that HTTPS server is listening. Set it to *0* to disable HTTPS. If HTTPS is enabled, you must provide private key and certificate (in *key* and *cert* configuration fields). Standard port for HTTPS is *443* but the server must run as root to be able to listen on this port. If you don't run the server as root, you must listen on a port number greater than *1024*.
143
+
144
+
### path
145
+
146
+
This is the URL path that the server will listen. Default value is *simple*, thus to list all packages, you should open URL <http://my.shop.host/simple>. To list available version for package *spam*, you would open URL <http://my.shop.host/simple/spam>. To download version *1.2.3* of this package, you would open <http://my.shop.host/simple/spam/spam-1.2.3.tar.gz>. This value should not be changed.
147
+
148
+
### shop
149
+
150
+
This is the URL of the public package repository, aka <http://pypi.python.org/simple>. This should not be changed.
151
+
152
+
### auth
153
+
154
+
This is the basic authentication configuration. If you don't want authentication, set this value to *~*. This is a list of usernames and MD5 hash of their password. To get the MD5 hash of a given password, you can type following command:
155
+
156
+
$ echo -n foo | md5sum
157
+
acbd18db4cc2f85cedef654fccc4a4d8 -
116
158
117
-
You should copy the certificate in directory */etc/ssl/certs* and the key in */etc/ssl/private*.
159
+
Note that if you modify this configuration, you must restart server, because this configuration is loaded at startup.
0 commit comments