]> Cypherpunks.ru repositories - gocheese.git/blob - README
Linux does not have sha256sum command
[gocheese.git] / README
1 GoCheese is Python private package repository and caching proxy.
2
3 It serves two purposes:
4
5 * hosting of private locally uploaded packages
6   (conforming to PEP-0503 (Simple Repository API))
7 * proxying and caching of missing packages from upstream PyPI
8
9 To use it, just configure your pip.conf:
10
11     [install]
12     index-url = http://gocheese.host:8080/simple/
13
14 You can upload packages to it with twine:
15
16     twine upload
17         --repository-url http://gocheese.host:8080/simple/ \
18         --username spam \
19         --passwd foo dist/tarball.tar.gz
20
21 You have to store your authentication data in a file (specified
22 with -passwd option) with following format:
23
24     username:hashed-password
25
26 Supported hashing algorithms are SHA256 and Argon2i.
27 It's recommended to use Argon2i.
28
29 To get Argon2i hashed-password you can use any of following tools:
30
31     https://github.com/balakhonova/argon2i (Go)
32     https://github.com/p-h-c/phc-winner-argon2 (C)
33
34 To get SHA256 hashed-password you can use your operating system tools:
35
36     # BSD-based systems:
37     $ echo -n 'password' | sha256
38     # GNU/Linux-based systems
39     $ echo -n 'password' | sha256sum
40
41 For example user "foo" with password "bar" can have the following
42 hashed passwords:
43
44     foo:$sha256$fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9
45     foo:$argon2i$v=19$m=32768,t=3,p=4$OGU5MTM3YjVlYzQwZjhkZA$rVn53v6Ckpf7WH0676ZQLr9Hbm6VH3YnL6I9ONJcIIU
46
47 Root directory has the following hierarchy:
48
49     root
50       +-- public-package
51       |     +- public-package-0.1.tar.gz.sha256
52       |     +- public-package-0.2.tar.gz
53       |     +- public-package-0.2.tar.gz.sha256
54       +-- private-package
55       |     +- .private
56       |     +- private-package-0.1.tar.gz
57       |     +- private-package-0.1.tar.gz.sha256
58       |...
59
60 Each directory is a package name. When you trie to list unexistent
61 directory contents (you are downloading package you have not seen
62 before), then GoCheese will download all its package versions with
63 checksums and write then in .sha256 files. So you know what versions are
64 available at the moment. When you asks for particular package, then its
65 tarball is really downloaded and verified against the checksum. For
66 example in the root directory above we have downloaded only
67 public-package-0.2. Private packages contain .private file, indicating
68 that it must not be asked in PyPI if required version is missing.
69
70 -refresh URL behaves the same way as -simple one, but is always
71 refreshes package versions from PyPI when listing it. You can use it to
72 forcefully update package version.
73
74 Initially it was created as a fork of https://github.com/c4s4/cheeseshop,
75 but nearly all the code was rewritten. It has huge differences:
76
77 * no TLS support
78 * no YAML configuration, just command-line arguments
79 * no package overwriting ability
80 * atomic packages store on filesystem
81 * proxying and caching of missing packages
82 * SHA256-checksummed packages (both uploaded and proxied one)
83
84 GoCheese is free software: see the file COPYING for copying conditions.