Created
May 19, 2017 04:57
-
-
Save DeoLeung/5b361af48bf674288d4f8ce741fbd4af to your computer and use it in GitHub Desktop.
搭建内部python registry, 使用douban镜像
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# devpi server | |
# install package | |
pip install --trusted-host pypi.douban.com -i http://pypi.douban.com/simple devpi | |
# initialize the server directory | |
devpi-server --init | |
# create the supervisord devpi.ini or start the server directly, if not root user, provide the --serverdir | |
devpi-server --host 0.0.0.0 --port 3141 --serverdir ~/.devpi/server | |
# after the server is running | |
# point to registry | |
devpi use http://localhost:3141 | |
# create a user | |
devpi user -c yourusername [email protected] password=yourpassword | |
# show users | |
devpi user -l | |
# login | |
devpi login yourusername --password yourusername | |
# mirror douban | |
devpi index -c douban type=mirror mirror_url=http://pypi.douban.com/simple | |
# extra registry for internal package | |
devpi index -c dev bases=yourusername/douban | |
# show logs | |
devpi-server --log | |
tail -f ~/.devpi/server/.xproc/devpi-server/xprocess.log | |
# upload package | |
devpi use yourusername/dev | |
devpi login yourusername --password yourusername | |
devpi upload --index yourusername/dev | |
# upload package |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment