Skip to content

Sample application providing feed replication for NuGet and NPM feeds hosted on MyGet.org

License

Notifications You must be signed in to change notification settings

MyGet/sample-feedreplication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyGet Samples - Feed replication

Sample application providing feed replication for NuGet and NPM feeds hosted on MyGet.org.

Requirements

The application is a .NET Core 2.0 console application that can be run on-demand or as a scheduled task.

Configuration

There is a config.json file in which replication pairs can be added. Replication supports NuGet V2 (not V3!) and npm feeds.

An example using NuGet:

{
  "replicationPairs": [
    {
      "description": "Replicate feed to first server (NuGet)",
      "type": "nuget",
      "source": {
        "url": "https://www.myget.org/F/test-source/api/v2",
        "token": "api-key-goes-here",
        "username": "my-username",
        "password": "my-password"
      },
      "destination": {
        "url": "https://www.myget.org/F/test-destination/api/v2",
        "token": "api-key-goes-here",
        "username": "my-username",
        "password": "my-password"
      },
      "allowDeleteFromDestination": false
    }
  ]
}

The above sample will:

  • Replicate NuGet packages from the feed https://www.myget.org/F/test-source/api/v2 to the feed https://www.myget.org/F/test-destination/api/v2
  • Never delete destination packages (hen packages are removed from source, these will remain in destination)
  • Use the configured username/password and access token (API key)

Disclaimer

This sample is provided as-is. Please us with caution (especially the allowDeleteFromDestination option). Test the application on a test environment when unsure.

About

Sample application providing feed replication for NuGet and NPM feeds hosted on MyGet.org

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages