Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Managing Git Repositories in Junos Space

In Junos Space Network Management Platform, you can manage Git repository connections from the Git Repositories page of the Administration workspace. External Git repositories are added to Junos Space to enable the import of CLI Configlets and scripts from the repositories to the Junos Space database.

You can perform the following tasks from the Administration > Git Repositories page of Junos Space Platform:

Adding Git Repositories to Junos Space

You can add multiple Git repositories for importing CLI Configlets and scripts. While adding a Git repository to Junos Space, you can specify whether the Git repository is a configlets repository or a scripts repository.

To add a Git repository to Junos Space:

  1. On the Junos Space Platform UI, select Administration > Git Repositories.

    The Git Repositories page appears, displaying the Git repositories added to Junos Space.

  2. Click the Add Git Repository icon to add a Git repository.

    The Add Git Repository dialog box is displayed.

  3. In the Repository HTTPS URL field, enter the HTTPS URL of the Git repository.
  4. (Optional) In the User Name field, enter the username for accessing the Git repository.
    Note:

    If the Git repository does not require user credentials for access, you do not need to enter a username and password. If you choose to enter the username and password, you must enter values in both the fields.

  5. (Optional) In the Password field, enter the password of the Git user whose username you entered.
  6. (Optional) In the Confirm Password field, reenter the password.
  7. From the Type list, select the type of Git repository you are adding.

    You can select either Configlets or Scripts.

  8. (Optional) Select the Set as active repository check box to designate the Git repository being added as the active Git repository of that type.

    When you set the active Git repository, the Git repository that was previously the active repository of that type is deactivated.

  9. Click Save to save the information in Junos Space Platform.

    The Git Repository Add Information dialog box appears, displaying the job ID link.

  10. Perform one of the following actions:
    • Click the job ID link to view the details of the job on the Job Management page.

    • Click OK to return to the Git Repositories page.

      When the job is successfully completed, information about the newly added Git repository is displayed on the Git Repositories page.

Modifying Git Repositories in Junos Space

From the Git Repositories page of the Administration workspace, you can modify the details of the Git repositories that you have added to Junos Space.

To modify the connection details of a Git repository:

  1. On the Junos Space Platform UI, select Administration > Git Repositories.

    The Git Repositories page appears, displaying the Git repositories added to Junos Space.

  2. Double-click the row or click the Edit icon beside the URL of the Git repository whose details you want to modify.
  3. Modify the necessary fields displayed in the inline editor.
    Note:

    The Repository HTTPS URL and Type fields cannot be modified. See Adding Git Repositories to Junos Space for more information about modifying the fields.

  4. Click Save to save your changes.

You are returned to the Git Repositories page where you can see the updated information.

Deleting Git Repositories from Junos Space

You can delete the Git repositories that are added to Junos Space from the Git Repositories page.

To delete the Git repository:

  1. On the Junos Space Platform UI, select Administration > Git Repositories.

    The Git Repositories page appears, displaying the Git repositories added to Junos Space.

  2. Select the Git repository you want to delete by clicking the respective row, then click the Delete icon at the top of the page.

    A confirmation dialog box appears.

    Note:

    You cannot delete an active Git repository. If you have selected an active Git repository, a warning message is displayed. Click OK to return to the Git Repositories page.

  3. Click Yes to confirm.

You are returned to the Git Repositories page. The deleted Git repository is removed from the page.

Setting the Active Git Repository

In Junos Space Platform, you can add multiple Git repositories, but you can designate only one configlets repository and one scripts repository as the active Git repositories for CLI Configlets and scripts respectively. CLI Configlets and scripts are imported from the active Git repository of that particular type. When you designate a Git repository as an active repository, the previously active repository of that type is no longer active.

To set the active Git repository:

  1. On the Junos Space Platform UI, select Administration > Git Repositories.

    The Git Repositories page appears, displaying the Git repositories added to Junos Space.

  2. Select the Git repository you want to mark as active by clicking the respective row.
  3. Click the Set Active Git Repository icon at the top of the page.

    A confirmation message is displayed.

  4. Click Yes to confirm.

    The selected Git repository becomes the new active Git repository of that type. The previously active Git repository of the same type is no longer designated the active Git repository.

The Active column on the Git Repositories page displays Yes for the active Git repositories.

Testing the Connection to the Git Repository

After you add a Git repository to Junos Space, you can test the connection to make sure that the Git repository is accessible and CLI Configlets or scripts can be imported, depending on the type of Git repository that you added.

To test the connection to the Git repository:

  1. On the Junos Space Platform UI, select Administration > Git Repositories.

    The Git Repositories page appears, displaying the Git repositories added to Junos Space.

  2. Select the Git repository for which you want to test the connection by clicking the respective row, then click Test Connection at the top right of the page.

    The Confirm Connection Test dialog box appears, displaying a message indicating that testing the connection may take several minutes. You are prompted to confirm whether you want to continue.

  3. Click Yes to confirm.

    The Status dialog box appears, displaying the status indicating whether the connection test was successful or failed.

  4. Click OK.

    You are returned to the Git Repositories page.