Navigation

    Inedo Community Forums

    Forums

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Crimrose
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Crimrose

    @Crimrose

    Bookworm, witty commenter, looking for innovative technologies

    1
    Reputation
    11
    Posts
    3
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Location VN

    Crimrose Follow

    Best posts made by Crimrose

    • Run proget container as non root

      I have problem with proget when running it as non root container due to proget server required port 80, 1000 which is private port.
      Here is the logs error
      Unable to start Kestrel. System.Net.Sockets.SocketException (13): Permission denied while running alpine as non root user
      May I know are there any ways to change the port of Proget config to use port > 1024 ?

      posted in Support
      Crimrose
      Crimrose

    Latest posts made by Crimrose

    • RE: How to fix base url in xml file of feed?

      Finally I found out the way to fix it. So if you want to setup reverse proxy before proget endpoint chocolatey you can use this way.

      location  /188aluw0iaby5mhin1qaotgfwl8qwxzzbr5ayw4in3n0ls2nslzssfdw2hl7zs13/ {
          limit_except GET {
              deny  all;
          }
          sub_filter_types            'application/atom+xml';
          sub_filter_once             off;
          sub_filter                  'https://proget-test.com/nuget/chocolatey/'  'https://$http_host/188aluw0iaby5mhin1qaotgfw.....in3n0ls2nslzssfdw2hl7zs13/';
          rewrite                     /[^/]+/(.*) /nuget/chocolatey/$1 break;
          proxy_pass                  https://proget-test.com;
          proxy_pass_request_headers  on;
          proxy_set_header            Accept-Encoding "";
          proxy_set_header            X-Real-IP $remote_addr;
          proxy_set_header            X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header            X-Forwarded-Proto https;
      }
      
      posted in Support
      Crimrose
      Crimrose
    • How to fix base url in xml file of feed?

      Hello, I faced issue with installing chocolatey packages via reverse proxy Nginx.
      I use this command

      choco install -y testpackage -s="https://dff91dbae543.ngrok.io/188aluw0iaby5mhin1qaotgfwl8qwxzzbr5ayw4in3n0ls2nslzssfdw2hl7zs13/"'

      Powershell was returned result

      Installing the following packages:
      testpackage
      testpackage not installed. An error occurred during installation:
       The underlying connection was closed: The connection was closed unexpectedly.
      testpackage package files install completed. Performing other installation steps.
      The install of testpackage was NOT successful.
      testpackage not installed. An error occurred during installation:
       The underlying connection was closed: The connection was closed unexpectedly.
      

      My topology
      proget.png

      In here, users will connect via reverse proxy to download the chocolatey packages in Proget. Of course, they can't connect directly to proget to download package.

      Here's my nginx config

      location  /188aluw0iaby5mhin1qaotgfwl8qwxzzbr5ayw4in3n0ls2nslzssfdw2hl7zs13/ {
          limit_except GET {
              deny  all;
          }
          rewrite                     /[^/]+/(.*) /nuget/chocolatey/$1 break;
          proxy_pass                  $choco_url;
          proxy_pass_request_headers  on;
          proxy_set_header            X-Real-IP $remote_addr;
          proxy_set_header            X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header            X-Forwarded-Proto https;
      }
      

      When I checked the request that used for installing packages

      https://dff91dbae543.ngrok.io/188aluw0iaby5mhin1qaotgfwl8qwxzzbr5ayw4in3n0ls2nslzssfdw2hl7zs13/Packages()?$filter=(tolower(Id)%20eq%20%27testpackage%27)%20and%20IsLatestVersion
      

      The result is

      <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://test-proget.com/nuget/chocolatey/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"><title type="text">Packages</title><id>http://test-proget.com/nuget/chocolatey/Packages()/</id><updated>2020-12-28T07:26:14Z</updated><link rel="self" title="Packages" href="Packages" /><entry><id>http://test-proget.com/nuget/chocolatey/Packages(Id='testpackage',Version='1.2.5')</id><title type="text">testpackage</title><summary type="text">Here is the testing package</summary><updated>2020-11-11T07:58:55Z</updated><author><name>Kien Tran</name></author><link rel="edit-media" title="Package" href="Packages(Id='testpackage',Version='1.2.5')/$value" /><link rel="edit" title="Package" href="Packages(Id='testpackage',Version='1.2.5')" /><category term="NuGet.Server.DataServices.Package" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><content type="application/zip" src="http://test-proget.com/nuget/chocolatey/package/testpackage/1.2.5" /><m:properties xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><d:Version>1.2.5</d:Version><d:Title>testPackage (Install)</d:Title><d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance><d:Description>Testing package</d:Description><d:ReleaseNotes></d:ReleaseNotes><d:Summary>Here is the testing package</d:Summary><d:ProjectUrl>https://_Software_Location_REMOVE_OR_FILL_OUT_</d:ProjectUrl><d:Icon></d:Icon><d:IconUrl></d:IconUrl><d:LicenseExpression></d:LicenseExpression><d:LicenseUrl></d:LicenseUrl><d:Copyright></d:Copyright><d:Tags>testpackage SPACE_SEPARATED</d:Tags><d:Dependencies></d:Dependencies><d:IsLocalPackage m:type="Edm.Boolean">true</d:IsLocalPackage><d:Created m:type="Edm.DateTime">2020-11-11T07:58:55.7770000Z</d:Created><d:Published m:type="Edm.DateTime">2020-11-11T07:58:55.7770000Z</d:Published><d:PackageSize m:type="Edm.Int64">2865</d:PackageSize><d:PackageHash>ph7XSMBexaAKuvjOlQ3RWuRk5fIV++r3ll8N8TXvMcHDweyh9YqF/DwIUoMFDbcqgdXRMO9/4hvdNxWOUjGDuQ==</d:PackageHash><d:IsLatestVersion m:type="Edm.Boolean">true</d:IsLatestVersion><d:IsAbsoluteLatestVersion m:type="Edm.Boolean">true</d:IsAbsoluteLatestVersion><d:IsProGetHosted m:type="Edm.Boolean">true</d:IsProGetHosted><d:IsPrerelease m:type="Edm.Boolean">false</d:IsPrerelease><d:IsCached m:type="Edm.Boolean">false</d:IsCached><d:NormalizedVersion>1.2.5</d:NormalizedVersion><d:Listed m:type="Edm.Boolean">true</d:Listed><d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm><d:HasSymbols m:type="Edm.Boolean">false</d:HasSymbols><d:HasSource m:type="Edm.Boolean">false</d:HasSource><d:DownloadCount m:type="Edm.Int32">14</d:DownloadCount><d:VersionDownloadCount m:type="Edm.Int32">14</d:VersionDownloadCount></m:properties></entry></feed>
      

      I think the error come from the src of file xml feeds, it's always return http://test-proget.com, even while I was downloading package via reverse proxy url https://dff91dbae543.ngrok.io/188aluw0iaby5mhin1qaotgfwl8qwxzzbr5ayw4in3n0ls2nslzssfdw2hl7zs13/.

      May I know are there any way to change the url of xml file or fix this.

      Another information, If my vm have flow to proget server I can download the choco package via reverse proxy, but if my vm can't reach proget it's can't download via reverse proxy. It's means that somethings happened during the installation the chocolatey package 😕 .
      I also tried sub_filter but it's not affect.

      posted in Support
      Crimrose
      Crimrose
    • Create API key per packages

      Hello,
      Are there any ways to generate API keys for each packages in chocolatey feeds?
      For example, I have 2 project and now I want to have 2 different API key. So the API key of lua project can't be used on notepad2 project.
      b08184ad-c22b-47b9-9b8c-9c5284340f3b-image.png

      As I know the API Key that generated in Settings will be used for all packages.

      posted in Support
      Crimrose
      Crimrose
    • Validate chocolatey checksum before installing package

      Hello, may I know are there any ways to validate the checksum of chocolatey package that correct before installing this package? If it possible can you let me know how I can test the case that my package's checksum was changed.

      Here is my chocolateyInstall.ps1 script.

      $ErrorActionPreference = 'Stop';
      
      $packageName  = 'test-pkg'
      $toolsDir     = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
      $fileLocation = Join-Path $toolsDir 'test_pkg-20.12.58.msi'
      
      $packageArgs = @{
        packageName   = $packageName
        softwareName  = 'test-pkg*'
        file          = $fileLocation
        fileType      = 'msi'
        silentArgs    = "/qn /norestart"
        validExitCodes= @(0)
        checksum      = '6640E0031CCC6D9EF948BF661F821F7347AE78C35D2B8C51F2AFEE477C7F8F41'
        checksumType  = 'sha256'
      }
      
      Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force
      Install-ChocolateyInstallPackage @packageArgs 
      
      posted in Support
      Crimrose
      Crimrose
    • RE: Push package to chocolatey feeds with cURL

      Thank for your suggestion.
      This command work for me

      dotnet nuget push notepad2.4.2.25.3.nupkg -k apikey -s https://proget-sample.com/nuget/chocolatey/

      posted in Support
      Crimrose
      Crimrose
    • RE: Problems with running proget5.3.16 in kubernetes1.18.3

      Thanks for explanation @rhessinger .
      Can you help me with another question about the issue related to update version of proget from 5.3.15 to 5.3.16 on Openshift 3.11 with MSSQL Express 19 on centos 7?

      Before I was used the version 5.3.15, then I decided to update the image to use version 5.3.16 but the pods show the error logs that the version of data database is 5.3.15, for proget is 5.3.16 -> Proget pods crashed several times due to data in database not match with proget version.

      Finally I decided to drop all tables in proget to make it generate new data and this pod become normally. But this solution just for testing environment. My question is how can I perform updating version for proget without wipe out the database?

      posted in Support
      Crimrose
      Crimrose
    • Push package to chocolatey feeds with cURL

      May I know how we can push the chocolatey package *.nupkg to the chocolatey feeds in Proget with cURL or any linux commands/tools (not using choco )?

      As in my case i'm using the linux runner to automate the push packages.

      posted in Support
      Crimrose
      Crimrose
    • RE: Problems with running proget5.3.16 in kubernetes1.18.3

      As I search about mono
      "Mono is a software platform designed to allow developers to easily create cross platform applications. Sponsored by Novell, Mono is an open source implementation of Microsoft’s .NET Framework based on the ECMA standards for C# and the Common Language Runtime. A growing family of solutions and an active and enthusiastic contributing community is helping position Mono to become the leading choice for development of Linux applications."

      It's something like support C#, .net in linux env.
      In your case I don't know exactly what are different between 2 images (no dockerfile or docs to track).
      I faced issue when I deploy this image proget.inedo.com/productimages/inedo/proget on openshift 3.11, then I tried to use mono image then it work normally.

      posted in Support
      Crimrose
      Crimrose
    • RE: Problems with running proget5.3.16 in kubernetes1.18.3

      Can you try to change image from proget.inedo.com/productimages/inedo/proget to proget.inedo.com/productimages/inedo/progetmono?
      It may help.

      posted in Support
      Crimrose
      Crimrose
    • RE: Run proget container as non root

      @Crimrose said in Run proget container as non root:

      I have problem with proget when running it as non root container due to proget server required port 80, 1000 which is private port.
      Here is the logs error
      Unable to start Kestrel. System.Net.Sockets.SocketException (13): Permission denied while running alpine as non root user
      May I know are there any ways to change the port of Proget config to use port > 1024 ?

      Sorry for the logs output that I copied wrong, but proget has same error status.

      posted in Support
      Crimrose
      Crimrose