Using NuGet artifact repositories

To configure NuGet in a restricted environment, modify the nuget.config file and use the SSL_CERT_FILE environment variable in the devfile to add self-signed certificates.

Configuring NuGet to use a non-standard artifact repository

NuGet searches for configuration files anywhere between the solution directory and the driver root directory. If you put the nuget.config file in the /projects directory, the nuget.config file defines NuGet behavior for all projects in /projects.

  • Create and place the nuget.config file in the /projects directory.

    Example nuget.config with a Nexus repository hosted at
    <?xml version="1.0" encoding="UTF-8"?>
        <add key="nexus2" value=""/>
            <add key="Username" value="user" />
            <add key="Password" value="..." />

Using self-signed certificates in NuGet projects

Internal artifact repositories often do not have a self-signed TLS certificate signed by an authority that is trusted by default. They are usually signed by an internal company authority or are self-signed. Configure your tools to accept these certificates.

  1. Obtain the certificate file of a non-standard repository and place it in the /projects/tls/rootCA.crt file to make it accessible from all your containers.

  2. Specify the location of the certificate file in the SSL_CERT_FILE environment variable in your devfile for the OmniSharp plug-in and for the .NET container.

    Example of the devfile:
      - id: redhat-developer/che-omnisharp-plugin/latest
        memoryLimit: 1024Mi
        type: chePlugin
        alias: omnisharp
         - value: /projects/tls/rootCA.crt
           name: SSL_CERT_FILE
     - mountSources: true
         - name: 5000/tcp
           port: 5000
       memoryLimit: 512Mi
       type: dockerimage
         - name: dotnet
           containerPath: /home/user
       alias: dotnet
       image: ''
         - value: /projects/tls/rootCA.crt
           name: SSL_CERT_FILE