]> Cypherpunks.ru repositories - gocheese.git/blob - README
sha256 is command name, not the algorithm
[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     echo -n 'password' | sha256 - for BSD-based systems
37     echo -n 'password' | sha256sum - for Linux-based systems
38
39 For example user "foo" with password "bar" can have the following
40 hashed passwords:
41
42     foo:$sha256$fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9
43     foo:$argon2i$v=19$m=32768,t=3,p=4$OGU5MTM3YjVlYzQwZjhkZA$rVn53v6Ckpf7WH0676ZQLr9Hbm6VH3YnL6I9ONJcIIU
44
45 Root directory has the following hierarchy:
46
47     root
48       +-- public-package
49       |     +- public-package-0.1.tar.gz.sha256
50       |     +- public-package-0.2.tar.gz
51       |     +- public-package-0.2.tar.gz.sha256
52       +-- private-package
53       |     +- .private
54       |     +- private-package-0.1.tar.gz
55       |     +- private-package-0.1.tar.gz.sha256
56       |...
57
58 Each directory is a package name. When you trie to list unexistent
59 directory contents (you are downloading package you have not seen
60 before), then GoCheese will download all its package versions with
61 checksums and write then in .sha256 files. So you know what versions are
62 available at the moment. When you asks for particular package, then its
63 tarball is really downloaded and verified against the checksum. For
64 example in the root directory above we have downloaded only
65 public-package-0.2. Private packages contain .private file, indicating
66 that it must not be asked in PyPI if required version is missing.
67
68 -refresh URL behaves the same way as -simple one, but is always
69 refreshes package versions from PyPI when listing it. You can use it to
70 forcefully update package version.
71
72 Initially it was created as a fork of https://github.com/c4s4/cheeseshop,
73 but nearly all the code was rewritten. It has huge differences:
74
75 * no TLS support
76 * no YAML configuration, just command-line arguments
77 * no package overwriting ability
78 * atomic packages store on filesystem
79 * proxying and caching of missing packages
80 * SHA256-checksummed packages (both uploaded and proxied one)
81
82 GoCheese is free software: see the file COPYING for copying conditions.