Main Content

matlab.mpm.RepositoryConfiguration

R2026b

Repository parameters

Since R2026b

    Description

    A matlab.mpm.RepositoryConfiguration object contains the parameters necessary to make a new repository connection, including connections to remote repositories.

    Creation

    Description

    repoConfig = matlab.mpm.RepositoryConfiguration(repoconfigJSON)

    example

    Input Arguments

    expand all

    Repository configuration JSON file, specified as a string scalar or character vector containing the path to a repo-config.json file. An example file:

    {
      "schema_version": "1.0.0",
      "repository_configuration": [
        {
          "name": "corp-repo",
          "url": "https://mprs.corp.com:8080/",
          "type": "custom",
          "auth": {
            "type": "token",
            "access_token": "${ARTIFACTORY_TOKEN}"
          }
        }
      ]
    }

    For additional information on setting up a custom repository, see Distribute Packages Using MATLAB Package Repository Service.

    Properties

    expand all

    Repository name, returned as a string scalar containing the name for the repository. This property corresponds to the Name property of the matlab.mpm.Repository object.

    Example: "custom-repo"

    Repository location, returned as a string scalar containing the URL location for the repository. This property corresponds to the Location property of the matlab.mpm.Repository object.

    Example: "https://mprs.corp.com:8080/"

    Object Functions

    Examples

    collapse all

    Create a matlab.mpm.RepositoryConfiguration object from a repo-config.json file containing the relevant repository information.

    repositoryConfig = matlab.mpm.RepositoryConfiguration("/path/to/repo-config.json")
    1×1: 
    
    repositoryConfig =  
     
      matlab.mpm.RepositoryConfiguration with properties: 
     
        Name: "custom-repo" 
        URL: "https://mprs.corp.com:8080/" 

    Version History

    Introduced in R2026b