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.
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
Create and place the
nuget.configfile in the
nuget.configwith a Nexus repository hosted at
<?xml version="1.0" encoding="UTF-8"?> <configuration> <packageSources> <add key="nexus2" value="https://nexus.example.org/repository/nuget-hosted/"/> </packageSources> <packageSourceCredentials> <nexus2> <add key="Username" value="user" /> <add key="Password" value="..." /> </nexus2> </packageSourceCredentials> </configuration>
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.
Obtain the certificate file of a non-standard repository and place it in the
/projects/tls/rootCA.crtfile to make it accessible from all your containers.
Specify the location of the certificate file in the
SSL_CERT_FILEenvironment variable in your devfile for the OmniSharp plug-in and for the .NET container.Example of the devfile:
components: - id: redhat-developer/che-omnisharp-plugin/latest memoryLimit: 1024Mi type: chePlugin alias: omnisharp env: - value: /projects/tls/rootCA.crt name: SSL_CERT_FILE - mountSources: true endpoints: - name: 5000/tcp port: 5000 memoryLimit: 512Mi type: dockerimage volumes: - name: dotnet containerPath: /home/user alias: dotnet image: 'quay.io/eclipse/che-dotnet-2.2:7.7.1' env: - value: /projects/tls/rootCA.crt name: SSL_CERT_FILE