Giter VIP home page Giter VIP logo

nugetreflector's Introduction

NuGetReflector

This tool mirrors an NuGet repository to another NuGet server. This can be used to clone public repositories or used to make private repositories redundant.

Features:

  • Full Sync - Fully reconcile your mirror against a remote repository.
  • Delta Sync - Catch up on newly created packages and new updated packages. Note: this requires an atom feed modeled after the Chocolatey update feed.

Todo:

  • Improve logging
  • Support multiple mirrors
  • Threaded syncs... maybe, might be overkill

Install

Needs:

  • Python >= 2.7 (tested on 2.7.13)
  • Python < 3
  • Pip
  • DotNet CLI

Step 1:

Install the DotNet CLI. Instructions can be found on their repository.

Step 2:

Locate the dotnet binary and make note of the path.

On OS X:

which dotnet;
# /usr/local/share/dotnet/dotnet

On Linux:

It depends on your distro or where you extract the tarball.

On Windows:

Have not tested on Windows.

Step 3:

Get the source and configure options.

cd /opt;
git clone https://github.com/MelonSmasher/NuGetReflector.git;
cd NuGetReflector;
cp config/config.example.yaml config/config.yaml;
vi config/config.yaml; # Fill out your settings, see config options below.
pip install -r requirements.txt;

Config options:

  • remote:

  • local:

    • url: - local repo to host mirror # Default: http://localhost/
    • json_api: - request json from local API # Default false
    • api_key: - local repo api key # Default: null
    • package_storage_path: - Local path to store packages # Default: storage/packages/
    • dotnet_path: - Path to dontnet executable # Default: false # Example: /usr/local/share/dotnet/dotnet
  • hash:

    • verify_downloads: - Verify downloaded package hash. You should leave this enabled # Default: true
    • verify_uploaded: - Verify package hash after it has been uploaded to the mirror. You should leave this enabled # Default: true

Usage:

Full sync:

Manually:

./reflector.py -f;

Cron Job every 24 hours a 12:05 am:

5 0 * * * cd /opt/NuGetReflector; python /opt/NuGetReflector/reflector.py --full 1>> /opt/NuGetReflector/storage/log/sync.log 2>> /opt/NuGetReflector/storage/log/error.log

Incremental "delta" sync:

Manually:

./reflector.py -d;

Cron Job every 10 minutes:

*/10 * * * * cd /opt/NuGetReflector; python /opt/NuGetReflector/reflector.py --delta 1>> /opt/NuGetReflector/storage/log/sync.log 2>> /opt/NuGetReflector/storage/log/error.log

Contributing:

See the contribution guidelines.

nugetreflector's People

Contributors

melonsmasher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.