### Start Nexus Repository Source: https://help.sonatype.com/en/install-nexus-repository.html Execute this command in the Nexus Repository installation directory to start the application in the background. ```bash ./nexus start ``` -------------------------------- ### Install and Start Sonatype IQ Server Service Source: https://help.sonatype.com/en/run-iq-server-as-a-windows-service.html Commands to install and start the Sonatype IQ Server as a Windows service. Ensure you are logged in as an administrator. ```bash .\bin\clm install ``` ```bash .\bin\clm start ``` -------------------------------- ### Example: Install Ansible Collection with Nexus Server and API Key Source: https://help.sonatype.com/en/ansible-cli-usage.html An example of installing the 'community.general' collection directly from a Nexus repository, using a Base64 encoded API key and Nexus server URL. ```bash ansible-galaxy collection install community.general \ --api-key="$(echo -n 'admin:admin123' | base64)" \ --server="http://nexus-host:8081/repository/ansible-proxy/" ``` -------------------------------- ### Example: Install Ansible Collections from requirements.yml Source: https://help.sonatype.com/en/ansible-cli-usage.html An example of installing Ansible collections by specifying the requirements file named 'requirements.yml'. ```bash ansible-galaxy collection install -r requirements.yml ``` -------------------------------- ### Start IQ Server Using Startup Script Source: https://help.sonatype.com/en/install-self-hosted-iq-server.html Navigate to the IQ Server installation directory and use the provided startup script to start the server. This command initiates the IQ Server process using the configuration from the config.yml file. ```bash cd /opt/nexus-iq-server ./bin/nexus-iq-server server start ``` -------------------------------- ### npm Install with Verbose Logging Source: https://help.sonatype.com/en/configuring-npm.html This example shows the command line output when installing a package with `--loglevel info`. It demonstrates how npm fetches packages from the configured repository manager. ```bash $ npm --loglevel info install grunt ... npm http fetch GET http://localhost:8081/repository/npmjs-org/grunt/-/grunt-0.4.5.tgz npm http fetch 200 http://localhost:8081/repository/npmjs-org/grunt/-/grunt-0.4.5.tgz ... npm http fetch GET http://localhost:8081/repository/npm-all/underscore/-/underscore-1.7.0.tgz npm http fetch 200 http://localhost:8081/repository/npm-all/underscore/-/underscore-1.7.0.tgz ... ``` -------------------------------- ### Install and Verify Yum Package Source: https://help.sonatype.com/en/gpg-signatures-for-yum-proxy-group.html This example shows the output of installing the 'nano' package using Yum. It includes the process of retrieving and importing GPG keys, verifying repository signatures, and completing the package installation. This demonstrates Yum's built-in security features for content verification. ```bash $ yum install nano Loaded plugins: fastestmirror, ovl Determining fastest mirrors BaseOS/7/x86_64/signature | 475 B 00:00:00 BaseOS/7/x86_64/signature | 2.2 kB 00:00:02 !!! extras/7/x86_64/signature | 475 B 00:00:00 Retrieving key from http://host.docker.internal:8081/repository/proxy/RPM-GPG-KEY-CentOS-7 Importing GPG key 0xF4A80EB5: Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) " Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5 From : http://host.docker.internal:8081/repository/proxy/RPM-GPG-KEY-CentOS-7 Is this ok [y/N]: y Retrieving key from http://host.docker.internal:8081/repository/keys/RPM-GPGKEY-nxrmtest extras/7/x86_64/signature | 1.5 kB 00:00:06 !!! (1/3): BaseOS/7/x86_64/group_gz | 153 kB 00:00:00 (2/3): extras/7/x86_64/primary | 98 kB 00:00:00 (3/3): BaseOS/7/x86_64/primary | 2.9 MB 00:00:06 BaseOS 10072/10072 extras 448/448 Resolving Dependencies --> Running transaction check ---> Package nano.x86_64 0:2.3.1-10.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================================ Installing: nano x86_64 2.3.1-10.el7 BaseOS 440 k Transaction Summary ================================================================================================================================================================================================ Install 1 Package Total download size: 440 k Installed size: 1.6 M Is this ok [y/d/N]: y Downloading packages: nano-2.3.1-10.el7.x86_64.rpm | 440 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : nano-2.3.1-10.el7.x86_64 1/1 Verifying : nano-2.3.1-10.el7.x86_64 1/1 Installed: nano.x86_64 0:2.3.1-10.el7 Complete! ``` -------------------------------- ### Troubleshooting: Successful Database Connection Logs Source: https://help.sonatype.com/en/external-database-configuration.html Example log output showing a successful database connection and IQ Server initialization. These logs confirm that the database connection parameters are correctly configured and the server is starting up. ```log INFO com.sonatype.insight.brain.service.InsightBrainService - Initializing Nexus IQ Server 1 release 199.0-01 build build-number INFO com.sonatype.insight.brain.db.datastore.DefaultOperationalDataStore - Initializing the insight_brain_ods data store. DEBUG com.sonatype.insight.brain.db.datasource.DataSourceProvider - DB URL: 'jdbc:postgresql://localhost:5432/sbomm' ``` -------------------------------- ### Example yum-packages.txt File Content Source: https://help.sonatype.com/en/yum-analysis.html Illustrates the structure of a yum-packages.txt file, including package name, version, and installation status. ```text AntTweakBar.i386 1.14-5.el5 installed AGReader.i686 1.2-6.el6 installed 389-admin.x86_64 1.1.29-1.el5 installed ``` -------------------------------- ### Example GitLab CI/CD Pipeline for IQ Policy Evaluation Source: https://help.sonatype.com/en/ci-cd-pipelines---sonatype-for-gitlab-ci.html This example demonstrates a typical GitLab CI/CD pipeline setup for Sonatype Nexus IQ policy evaluation. It includes steps for evaluating policies and creating vulnerability reports, storing relevant JSON files as artifacts. ```yaml iq_policy_evaluation: stage: test image: sonatype/gitlab-nexus-iq-pipeline:latest script: - /sonatype/evaluate -i testapp -r scan-result.json -rrf reachability-result.json *.jar artifacts: when: always paths: - scan-result.json - reachability-result.json dependency_scanning: needs: ["iq_policy_evaluation"] stage: test when: always image: sonatype/gitlab-nexus-iq-pipeline:latest script: - /sonatype/create-vulnerability-report -r scan-result.json -rrf reachability-result.json --report-file vulnerability-report.json artifacts: reports: dependency_scanning: vulnerability-report.json ``` -------------------------------- ### Example Go Configuration with Nexus Source: https://help.sonatype.com/en/configure-go-with-nexus.html A complete example demonstrating the initialization of a Go module, tidying dependencies, checking environment variables, and configuring Nexus as a proxy and checksum source. ```bash go mod init github.com/go-sample-project go mod tidy go env nano ~/.netrc ''' machine example.nexus.com login admin password admin123 ''' chmod 600 ~/.netrc # for Linux and macOS only go env -w GOPROXY=example.nexus.com/repository/go-proxy/ go env -w GOSUMDB='sum.golang.org example.nexus.com/repository/raw-proxy/' # for no checksum go env -w GONOSUMDB=* ``` -------------------------------- ### GET /api/v2/githubApp/setupInstallation Source: https://help.sonatype.com/en/iq-api-reference-338492.html Handles GitHub App installation setup callback with OAuth + PKCE. ```APIDOC ## GET /api/v2/githubApp/setupInstallation ### Description Handle GitHub App installation setup callback with OAuth + PKCE ### Method GET ### Endpoint /api/v2/githubApp/setupInstallation ``` -------------------------------- ### Get Installed License Source: https://help.sonatype.com/en/licensing-api.html Get details on the current installed license. ```APIDOC ## Get Installed License ### Description Get details on the current installed license. ### Method GET ### Endpoint `/service/rest/v1/system/license` ### Request Example ```curl curl -X 'GET' \ 'https://{nexusHost}/service/rest/v1/system/license' \ -H 'accept: application/json' \ -u {username}:{password} ``` ### Response #### Success Response (200) - **contactEmail** (string) - The email of the license contact. - **contactCompany** (string) - The company of the license contact. - **contactName** (string) - The name of the license contact. - **effectiveDate** (string) - The date the license becomes effective. - **expirationDate** (string) - The date the license expires. - **licenseType** (string) - The type of license. - **licensedUsers** (string) - The number of licensed users. - **fingerprint** (string) - The license fingerprint. - **features** (string) - The features included in the license. - **maxRepoComponents** (integer) - The maximum number of repository components allowed. - **maxRepoRequests** (integer) - The maximum number of repository requests allowed. ### Response Example ```json { "contactEmail": "string", "contactCompany": "string", "contactName": "string", "effectiveDate": "2025-03-27T16:58:45.032Z", "expirationDate": "2025-03-27T16:58:45.032Z", "licenseType": "string", "licensedUsers": "string", "fingerprint": "string", "features": "string", "maxRepoComponents": 0, "maxRepoRequests": 0 } ``` ``` -------------------------------- ### Example IQ Server Launch Command with Custom Truststore Source: https://help.sonatype.com/en/certificates-and-secure-connections.html An example of a complete command to launch IQ Server, including the Java arguments for specifying a custom truststore and its password. ```bash java -Djavax.net.ssl.trustStore=/nexus-iq-server/nexus-iq-server-outbound.jks -Djavax.net.ssl.trustStorePassword=changeit -jar nexus-iq-server-1.65.0-01.jar server config.yml ``` -------------------------------- ### Example Get Script Response Source: https://help.sonatype.com/en/script-api.html This is an example JSON response when getting the details of a specific script. ```json { "name" : "helloWorld", "content" : "log.info('Hello, World!')", "type" : "groovy" } ``` -------------------------------- ### Example: Interactive Pub Token Configuration Source: https://help.sonatype.com/en/configure-pub-with-nexus.html Demonstrates setting the PUB_HOSTED_URL and interactively adding a Pub token for Nexus. ```bash export PUB_HOSTED_URL=https://example.nexus.com/repository/pub-hosted dart pub token add https://example.nexus.com/repository/pub-hosted/ # Enter your token ``` -------------------------------- ### Create Installation Directory and Move Bundle Source: https://help.sonatype.com/en/install-self-hosted-iq-server.html Navigate to the /opt directory, create a new directory for the IQ Server installation, and move the downloaded bundle archive into it. This sets up the base location for the server files. ```bash cd /opt mkdir nexus-iq-server mv ~/Downloads/nexus-iq-server-bundle* nexus-iq-server/ cd nexus-iq-server ``` -------------------------------- ### Example: Environment Variable Pub Token Configuration Source: https://help.sonatype.com/en/configure-pub-with-nexus.html Shows setting PUB_HOSTED_URL, exporting the token to an environment variable, and then adding it to Pub. ```bash export PUB_HOSTED_URL=https://example.nexus.com/repository/pub-hosted # export token into your env variable export DART_PUB_TOKEN="XXXXXXXXXXXX" dart pub token add "https:///repository//" --env-var DART_PUB_TOKEN ``` -------------------------------- ### Example: Configure Nexus Source and Authentication with Poetry Source: https://help.sonatype.com/en/configure-pypi-with-nexus.html A practical example demonstrating how to add a Nexus repository and configure its basic authentication using `poetry config`. ```bash poetry source add --priority=primary nexus http://example.nexus.com/repository/pypi-all/simple poetry config http-basic.nexus admin admin123 ``` -------------------------------- ### Curl Request Example Source: https://help.sonatype.com/en/report-rest-api.html Example of how to use curl to send a GET request to the dependency tree endpoint. ```bash curl -u admin:admin123 -X GET "http://localhost:8070/api/v2/applications/MyApp-1234/reports/68b6bdb1573a40eeb4205d890b602525/dependencyTree" ``` -------------------------------- ### Get All Roles Example Source: https://help.sonatype.com/en/role-rest-api.html Example using curl to retrieve all roles from IQ Server. Ensure you have the necessary authentication credentials. ```Shell curl -u admin:admin123 -X GET http://localhost:8070/api/v2/roles ``` -------------------------------- ### APT Proxy Re-signing Mode (Multi-Distribution) Example Source: https://help.sonatype.com/en/apt-repositories.html Example of sources.list entries for an APT proxy repository in re-signing mode supporting multiple distributions. Nexus generates metadata for each accessed distribution. ```bash deb http://nexus/repository/apt-proxy jammy main deb http://nexus/repository/apt-proxy focal main ``` -------------------------------- ### Configure Automatic License Installation Source: https://help.sonatype.com/en/product-license.html Add this property to your config.yml file to automatically install a license during initial setup. Ensure the path to your license file is correct. This is not used for existing installations. ```yaml licenseFile: ./license.lic ``` -------------------------------- ### Get Installed License - cURL Source: https://help.sonatype.com/en/licensing-api.html Use this endpoint to retrieve details about the currently installed product license. Requires authentication with username and password. ```curl curl -X 'GET' \ 'https://{nexusHost}/service/rest/v1/system/license' \ -H 'accept: application/json' \ -u {username}:{password} ``` -------------------------------- ### Get Specific Role Example Source: https://help.sonatype.com/en/role-rest-api.html Example using curl to retrieve a specific role by its ID. Replace '{roleId}' with the actual ID of the role you want to fetch. ```Shell curl -u admin:admin123 -X GET http://localhost:8070/api/v2/roles/1da70fae1fd54d6cb7999871ebdb9a36 ``` -------------------------------- ### Standard Go Release Version Example Source: https://help.sonatype.com/en/go-application-analysis.html Shows the format of a standard Go release version for comparison with pseudo-versions. ```go github.com/gohouse/converter v0.0.3 ``` -------------------------------- ### Install License via System Property Source: https://help.sonatype.com/en/installing-and-updating-licenses.html Use this system property to install a license when Nexus Repository is first initialized. This property is ignored after the initial setup. ```properties nexus.licenseFile=/absolute/path/to/license.lic ``` -------------------------------- ### Example: Create, Build, and Archive Ansible Collection Source: https://help.sonatype.com/en/ansible-cli-usage.html A complete example demonstrating the initialization, navigation, and building of an Ansible Galaxy collection. ```bash ansible-galaxy collection init myorg.mycollection cd myorg/mycollection ansible-galaxy collection build ``` -------------------------------- ### Get New Role Template Example Source: https://help.sonatype.com/en/role-rest-api.html Example using curl to fetch the template for creating a new role. The response includes default permission settings that can be modified. ```Shell curl -u admin:admin123 -X GET http://localhost:8070/api/v2/roles/new ``` -------------------------------- ### Get Cluster Nodes Response Example Source: https://help.sonatype.com/en/nodes-api.html Example JSON response when retrieving the list of nodes in the cluster. Each object represents a node with its identity, socket address, and friendly name. ```json [ { "nodeIdentity" : "20550283-C2239399-2DC0307C-DE78EE76-0670E0BC", "socketAddress" : "/172.18.0.2:5701", "friendlyName" : null }, { "nodeIdentity" : "2840754A-E8053498-0DA01A51-9A7582DD-A52D5279", "socketAddress" : "/172.18.0.3:5701", "friendlyName" : null }, { "nodeIdentity" : "A54F51B3-F0EBD6F7-23D4C3A0-ABA922CD-9DCE73EA", "socketAddress" : "/172.18.0.4:5701", "friendlyName" : null } ] ``` -------------------------------- ### Example API Response for User Roles Source: https://help.sonatype.com/en/configuring-service-accounts-and-user-tokens---nexus-repository-cloud.html This is an example of the JSON response from the Get User Roles API endpoint, showing both Nexus-internal and external role assignments for a service account. ```json { "userId": "svc-nexus-ci@example.com", "roles": ["nx-repository-view-*-*-browse", "nx-repository-view-*-*-read"], "externalRoles": ["Sonatype Platform - Repository Users"] } ``` -------------------------------- ### Sonatype CLI Example with Options Source: https://help.sonatype.com/en/using-the-sonatype-cli-with-a-ci-server.html An example demonstrating the Sonatype CLI with common options, including authentication, application ID, server URL, and the target artifact. ```shell java -jar nexus-iq-cli*.jar \ -a username:password \ -i tester123 \ -s http://localhost:8070 \ ./target/sample-app.war ``` -------------------------------- ### Example pubspec.lock File Content Source: https://help.sonatype.com/en/dart-and-flutter-analysis.html This example demonstrates the content of a pubspec.lock file, which lists exact dependency versions, including transitive dependencies. It is automatically generated by 'pub get'. ```yaml # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: dependency1: dependency: "direct main" description: name: dependency1 sha256: "aaf6da266a27a4538a69295ec142cb5717d7d4e5727b84658b63e1e1509bac9c" url: "https://pub.dev" source: hosted version: "1.0.0" dependency2: dependency: transitive description: name: dependency2 sha256: "bbf6da266a27a4538a69295ec142cb5717d7d4e5727b84658b63e1e1509bac9c" url: "https://pub.dev" source: hosted version: "2.0.0" dependency3: dependency: "direct dev" description: name: dependency3 sha256: "ccf6da266a27a4538a69295ec142cb5717d7d4e5727b84658b63e1e1509bac9c" url: "https://pub.dev" source: hosted version: "1.0.0" missing-version: dependency: "direct main" description: name: missing-version sha256: "ddf6da266a27a4538a69295ec142cb5717d7d4e5727b84658b63e1e1509bac9c" url: "https://pub.dev" source: hosted ``` -------------------------------- ### APT Proxy Passthrough Mode Example Source: https://help.sonatype.com/en/apt-repositories.html Example of a sources.list entry for an APT proxy repository in passthrough mode. Metadata is served directly from the upstream repository. ```bash deb http://nexus/repository/apt-proxy jammy main ``` -------------------------------- ### Get Vulnerability Details with Component Identifier Source: https://help.sonatype.com/en/vulnerability-details-rest-api.html Retrieve detailed vulnerability information, including root causes, by making an authenticated GET request with a component identifier. The component identifier is URL-encoded in the example. ```bash curl -u admin:admin123 'http://localhost:8070/api/v2/vulnerabilities/CVE-2022-22815?componentIdentifier=%7B%22format%22%3A%22pypi%22%2C%22coordinates%22%3A%7B%22extension%22%3A%22whl%22%2C%22name%22%3A%22Pillow%22%2C%22qualifier%22%3A%22cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64%22%2C%22version%22%3A%228.3.2%22%7D%7D' ``` -------------------------------- ### Example Default Registry URL Configuration (Linux) Source: https://help.sonatype.com/en/configure-spm-registry.html Provides an example of a configured default Swift Package Manager registry URL for Linux, using specific credentials and Nexus repository details. ```bash cat > ~/.swiftpm/configuration/registries.json <<'EOF' { "registries": { "[default]": { "url": "https://admin:admin123@example.nexus.com/repository/swift-hosted/" }, "version": 1 } EOF ``` -------------------------------- ### Kubernetes Storage Classes Output Example Source: https://help.sonatype.com/en/option-4---high-availability-deployment-in-azure.html This is an example output of the 'kubectl get storageclasses' command, showing the available storage classes for Azure Files. It confirms the presence of 'azurefile-csi-premium' which can be used for dynamic provisioning. ```text NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE azurefile file.csi.azure.com Delete Immediate true 29d azurefile-csi file.csi.azure.com Delete Immediate true 29d azurefile-csi-premium file.csi.azure.com Delete Immediate true 29d azurefile-premium file.csi.azure.com Delete Immediate true 29d ``` -------------------------------- ### Get Audit Logs Source: https://help.sonatype.com/en/audit-log-rest-api.html Retrieves audit log entries between the specified start and end dates (inclusive). ```APIDOC ## GET /api/v2/auditLogs?startUtcDate={startUtcDate}&endUtcDate={endUtcDate} ### Description Retrieves audit log entries between the specified start and end dates (inclusive). ### Method GET ### Endpoint /api/v2/auditLogs ### Parameters #### Query Parameters - **startUtcDate** (string) - Required - The start date in UTC format (yyyy-mm-dd). Events from this date onwards (inclusive) will be returned in the response. - **endUtcDate** (string) - Required - The end date in UTC format (yyyy-mm-dd). Events up to this date (inclusive) will be returned in the response. ### Request Example ```bash curl -u admin:admin123 'http://localhost:8070/api/v2/auditLogs?startUtcDate=2024-03-20&endUtcDate=2024-03-21' ``` ### Response #### Success Response (200) A successful GET request will generate a response consisting of lines from audit logs in chronologically ascending order. #### Response Example ```json { "timestamp": "2024-03-21T10:39:44.896-03:00", "username": "*SYSTEM", "domain": "server", "type": "start", "data": { "serverInstanceId": "7449fbe6-0fb1-4b71-b358-400cc9df673d", "serverConfigurationFile": "/home/config.yml", "serverRelease": "175.0-SNAPSHOT", "serverBuild": "build-number", "processOwner": "johndoe" } } { "timestamp": "2024-03-21T11:58:14.233-03:00", "remoteIpAddress": "127.0.0.1", "userAgent": "curl/7.81.0", "username": "admin", "domain": "audit-log", "type": "export", "error": "bad-request" } ``` ``` -------------------------------- ### Flat APT Repository Format Example Source: https://help.sonatype.com/en/apt-repositories.html Syntax for specifying a flat APT repository in sources.list. The URI points to the archive root, and 'directory' specifies the location of meta index and indices. ```bash deb uri directory/ ``` -------------------------------- ### Run IQ Server with Bundled JDK Source: https://help.sonatype.com/en/run-iq-server-as-a-service.html Starts IQ Server using the provided wrapper script when using the bundled JDK distribution. Specify the path to your configuration YAML file. ```bash /bin/nexus-iq-server server ``` -------------------------------- ### Show and Set Configuration Source: https://help.sonatype.com/en/support.html Use `config show` to review the current configuration and `config set` to provide missing values. ```bash config show config set source-nexus-url http://localhost:8081 ``` -------------------------------- ### GET Component Claim Response (JSON) Source: https://help.sonatype.com/en/component-claim-rest-api.html Example JSON response for a successful GET request for a component claim. Includes details like hash, comment, creation time, claimer information, component identifier, and package URL. ```json { "hash": "4632184fe1d932764efe", "comment": "c1", "createTime": "2020-02-14T00:00:00.000Z", "claimerId": "admin", "claimerName": "Admin BuiltIn" "componentIdentifier": { "format": "maven", "coordinates": { "artifactId": "a", "classifier": "c", "extension": "e", "groupId": "g", "version": "v" } }, "packageUrl": "pkg:maven/g/a@v?classifier=c&type=e" } ``` -------------------------------- ### Configure Apt Client Source List Source: https://help.sonatype.com/en/apt-repositories.html Add a hosted APT repository to your client's sources.list file. Replace `` and `` with the actual values for your Nexus Repository configuration. ```bash deb main ``` -------------------------------- ### Run Agent with All System Properties Source: https://help.sonatype.com/en/java-runtime-agent.html Launch the agent with a comprehensive set of system properties for advanced configuration. This includes detailed settings for IQ server connection, timeouts, and agent behavior. ```bash java \ -cp "$CLASSPATH" \ -javaagent:/sample/lib/runtime-agent.jar \ -Dsonatype.runtime.agent.enabled=true \ -Dsonatype.runtime.agent.debugMode=false \ -Dsonatype.runtime.agent.iq.protocol=https \ -Dsonatype.runtime.agent.iq.host=${IQ_HOST} \ -Dsonatype.runtime.agent.iq.port=${IQ_PORT} \ -Dsonatype.runtime.agent.iq.user=${IQ_USER_TOKEN} \ -Dsonatype.runtime.agent.iq.password=${IQ_USER_TOKEN_PASSWORD} \ -Dsonatype.runtime.agent.iq.applicationId=${IQ_APPLICATION_ID} \ -Dsonatype.runtime.agent.isIqApplicationIdPublic=true \ -Dsonatype.runtime.agent.iq.label=Runtime \ -Dsonatype.runtime.agent.iq.connectionTimeoutSeconds=30 \ -Dsonatype.runtime.agent.iq.requestTimeoutSeconds=120 \ -Dsonatype.runtime.agent.blockedRunOnStartup=true \ -Dsonatype.runtime.agent.scanClasspath=false \ -Dsonatype.runtime.agent.vulnerableMethodDetectionEnabled=true \ -Dsonatype.runtime.agent.fetchVulnerableClassesFromIQ=true \ -Dsonatype.runtime.agent.executor.initialDelaySeconds=500 \ -Dsonatype.runtime.agent.executor.delaySeconds=500 \ -Dsonatype.runtime.agent.removeRuntimeLabelsOnStartup=false \ -Dsonatype.runtime.agent.httpMaxThreads=10 \ com.sonatype.sample.SampleApplication ``` -------------------------------- ### Wildcard Search with Asterisk (*) Source: https://help.sonatype.com/en/search-examples-215924.html Use an asterisk (*) to match zero or many characters. This example finds values starting with 'v'. ```text fieldName:v* ``` -------------------------------- ### Example go.list output Source: https://help.sonatype.com/en/go-application-analysis.html Example output format for a go.list file, showing module path and version. ```text github.com/istio-ecosystem/authservice v1.0.1 github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 ``` -------------------------------- ### Get User Token Configuration cURL Source: https://help.sonatype.com/en/user-token-expiration-configuration-rest-api.html Example cURL command to retrieve the current user token expiration configuration. ```bash curl -u admin:admin123 -X GET http://localhost:8070/api/v2/config/userTokens ``` -------------------------------- ### Example Default Registry URL Configuration (Windows) Source: https://help.sonatype.com/en/configure-spm-registry.html Provides an example of a configured default Swift Package Manager registry URL for Windows, using specific credentials and Nexus repository details via PowerShell. ```powershell @'\n{\n "registries": {\n "[default]": {\n "url": "https://admin:admin123@example.nexus.com/repository/swift-hosted/"\n }\n },\n "version": 1\n}\n'@ | Set-Content -Encoding UTF8 "$env:USERPROFILE\.swiftpm\configuration\registries.json" ``` -------------------------------- ### Example: Add Nexus Helm Repository Source: https://help.sonatype.com/en/configure-helm-with-nexus.html An example of adding a Nexus Helm repository to your local Helm client configuration with specific values. ```bash helm repo add nexusrepo http://localhost:8081/repository/helm-proxy/ --username admin --password admin123 ```