Page History
...
JS7 offers JS7 - Inventory Git Integration for JS7 - Rollout of Scheduling Objects.
- Git access includes to authenticate authentication with a Git Server and to access accessing remote repositories.
- The setup of a local repository is explained with the JS7 - How to set up a local Git Repository article.
The steps to set for setting up access to a Git Server can be applied manually applied and can also be applied by use of using the JS7 REST Web Service API.
...
Git Configuration File
JOC Cockpit makes use of uses a Git client that which reads configuration items from the following file (assuming a user account me
being is in place)
- for Unix environments:
/home/me/.ssh/config
- for Windows environments:
C:\Users\me\.ssh\config
The Git config
file can may look like this:
Code Block | ||||
---|---|---|---|---|
| ||||
Host github.com Hostname github.com IdentityFile C:\Users\me\.ssh\github_rsa IdentitiesOnly yes |
Explanation:
- The settings maps map the use of a private key file to authentication with a Git Server.
...
Automation with the JS7 REST Web Service API
Users who whish wish to automate the steps to set for setting up Git access can use the following resources:
- The JS7 - REST Web Service API allows to perform the same operations to be performed for Git integration as offered from are provided in the JOC Cockpit GUI.
- The JS7 - PowerShell Module offers simplified access to the REST Web Service API for scripting purposes.
- The Execution of the PowerShell examples when executed with the
-debug
option might prove to be instructive for logging of REST API calls when used with the-debug
option.
- The Execution of the PowerShell examples when executed with the
Find the The documentation for related cmdlets from can be found in PowerShell CLI 2.0 - Cmdlets - Git Repository Integration.
...
Explanation:
- Line 2-6: Variables which are used by the subsequent examples.
- Line 9-10: The JS7 PowerShell Module is loaded and the connection to the JOC Cockpit is established , - see JS7 - How to connect to JOC Cockpit using the PowerShell Module.
- Line 13: The Add-JS7GitCredentials cmdlet allows to store Git credentials to be stored with the user account's profile. A private key file is specified. This file has to exist and is expected in the locations indicated with JS7 - Inventory Git Integration, chapter: Manage Credentials for Git Access.
- Line 16, 19: Alternative authentication methods for Git access.
- Line 22: The Remove-JS7GitCredentials cmdlet deletes Git credentials from the user account's profile.
- Line 25: The connection to JOC Cockpit is closed.
...