Giter VIP home page Giter VIP logo

repocache's Introduction

repocache

Universal caching and proxying repository server for pypi/maven/npm/yum/rustup, speedup local using.

Specially used in slow internet connection or intranet.

Python 3.5, 3.6, 3.7, 3.8 main workflow

How to startup?

pip install repocache

python -m repocache.main -f default.cfg
# listen at 0.0.0.0:5000

How to use repocache as YUM repository?

cd /etc/yum.repos.d

# base
curl -O http://192.168.1.2:5000/centos/huawei/Centos-7.repo
# sclo
curl -O http://192.168.1.2:5000/centos/sclo/Centos-7.repo

yum makecache

How to use repocache as NPM repository?

npm config set registry https://127.0.0.1:5000/npm/default/
npm config set prefix=$HOME/.node_modules_global
npm --verbose install [email protected] -g

NPM Search is support.

How to use repocache as MVN repository?

Change $HOME/.m2/settings.xml as:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <profiles>
        <profile>
            <id>repocache</id>
            <repositories>
                <repository>
                    <id>repocache</id>
                    <url>http://127.0.0.1:5000/mvn/default/</url>
                </repository>
                <repository>
                    <id>jitpack.io</id>
                    <url>http://127.0.0.1:5000/mvn/jitpack/</url>
                </repository>
            </repositories>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>repocache</activeProfile>
    </activeProfiles>
    <mirrors>
        <mirror>
            <id>repocache</id>
            <url>http://127.0.0.1:5000/mvn/default/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
    </mirrors>
</settings>
cd /path/to/java-project
mvn install

How to use repocache as PIP repository?

Simply install in shell:

pip install -i http://127.0.0.1:5000/pypi/simple --trusted-host=127.0.0.1:5000 click==7.1.2

Or change $HOME/.pip/pip.conf as:

[global]
trusted-host=127.0.0.1:5000
index-url=http://127.0.0.1:5000/pypi/simple

How to use repocache as Rustup repository?

export RUSTUP_DIST_SERVER=http://127.0.0.1:5000/rust/default

curl http://127.0.0.1:5000/rust/rustup.sh | sh

Settting file

See default.cfg

Open source

This repository was copy from pypicache early, but fully rewrite later. PR wellcome.

TODO:

Downloaded: http://conjars.org/repo/org/pentaho/pentaho-aggdesigner/5.1.5-jhyde/pentaho-aggdesigner-5.1.5-jhyde.pom (8.6 kB at 16 kB/s) Downloaded: http://conjars.org/repo/org/pentaho/pentaho-aggdesigner-algorithm/5.1.5-jhyde/pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar

repocache's People

Contributors

dotsbb avatar jpescalona avatar kgaughan avatar micktwomey avatar pedia avatar schinckel avatar szinsli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

isaron

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.