This article is a mirror article of machine translation, please click here to jump to the original article.

View: 54024|Reply: 2

[Source] Nuget Series 2 uses BaGet to build private Nuget services

[Copy link]
Posted on 2020-9-9 22:54:41 | | | |
In the process of Internet team and enterprise project development, we do not want to load commonly used libraries by reference, but can be packaged into nuget packages for easy management and maintenance, so we need a private nuget repository service.

Nuget Series 1 uses asp.net to build a private Nuget repository
https://www.itsvse.com/thread-9368-1-1.html


BaGet is an open-source project on GitHub, BaGet is a lightweight NuGet and Symbol server with a database defaultSqlite

First, the server needs to have the .NET Core 3.1 SDK installed. (omitted)

Install the "Hosting Bundle" and download it at:The hyperlink login is visible.

Otherwise, when IIS runs the NuGet site, the following error will be reported:

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the relevant configuration data for that page is invalid.

Download BaGet at the address:The hyperlink login is visible.

Create a new IIS site directory "C:\itsvse_file\wwwroot\nuget.itsvse.com" and extract the downloaded package to this directory.

Deploy ASP.NET Core to IIS server
https://www.itsvse.com/thread-7838-1-1.html

The application pool is set to No Managed Code, as shown in the following figure:



Access the bound site domain name as shown in the following figure:



You can modify the configuration according to your actual situation, and the configuration file is :appsettings.json

Reference:The hyperlink login is visible.

Try pushing the package with a command like this:

The error is as follows:

error: Response status code does not indicate success: 405 (Method Not Allowed).
Solution

Modify the web.config file of the IIS site as follows:

Try pushing again, and it succeeds as shown below:



(End)





Previous:Azure DevOps 2020 (IV) Compiled jobs using Pipelines
Next:Azure DevOps 2020 (V) Automate the release of NUGET packages using Pipelines
 Landlord| Posted on 2020-9-10 09:48:37 |
appsettings.json The configuration file is as follows:

 Landlord| Posted on 2021-5-31 09:29:35 |
Push nuget packages in bulk, the cmd script is as follows:

Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com