Skip to content

Commit c8b053f

Browse files
committed
Merge branch 'main' of https://github.com/intersystems/git-source-control into default-mappings-healthshare
2 parents cbdad3e + 90e07e5 commit c8b053f

File tree

5 files changed

+32
-6
lines changed

5 files changed

+32
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Settings page now has option to switch namespace (#856)
1414
- SourceControl.Git.Settings is now documented as part of the public API to allow programmatic configuration of settings (#262)
1515
- Newly configured instances start with default mappings for ESD, LUT and HL7 when relevant (#724)
16+
- New setting to define an SSH client configuration file for connections to SSH remotes (#293)
1617

1718
### Fixed
1819
- When cloning a repo with Configure, that repo's embedded-git-config file will overwrite previous settings (#819)
1920
- Settings page no longer removes remote when saving after cloning (#858)
2021
- Always set the remote as the upstream branch when pushing (#871)
2122
- Fixed import of HL7 and LUT files added at the same time as their mappings (#864)
23+
- Fixed issue where Git's interactive credential manager causes Git push/pull/fetch to hang (#235)
2224

2325
## [2.13.1] - 2025-09-16
2426

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ Embedded Git support for InterSystems platforms, supporting unified source contr
1414
```
1515
zpm "install git-source-control"
1616
```
17-
To install on an environment without access to the internet, download the tar.gz file from the [releases](https://github.com/intersystems/git-source-control/releases) page. Copy the archive onto a file system the IRIS instance has access to and extract it. Use the package manager to load the release from that directory.
17+
To install on an environment without access to the internet, download the tar.gz file from the [releases](https://github.com/intersystems/git-source-control/releases) page. Copy it into a directory accessible to the IRIS instance and use a command in the IRIS terminal to install from the tar.gz file.
1818
```
19-
tar -xf /path/to/archive/git-source-control-release.tar.gz
20-
zpm "load /path/to/archive/git-source-control-release"
19+
zpm "load /path/to/archive/git-source-control-release.tar.gz"
2120
```
2221
2. Configure settings by running the following method and answering the prompts:
2322
```
24-
d ##class(SourceControl.Git.API).Configure()
23+
do ##class(SourceControl.Git.API).Configure()
2524
```
2625
This will also allow you to generate an SSH key for use as (e.g.) a deploy key and to initialize or clone a git repo.
2726
3. If using VSCode: Set up `isfs` server-side editing. First, save your current workspace in which you have the code open. Then, open the `.code-workspace` file generated by VS Code and add the following to the list of folders:

cls/SourceControl/Git/Settings.cls

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ Property Mappings [ MultiDimensional ];
9393
/// (user-level) List of namespaces on this instance to include Embedded Git links in the SMP favorites
9494
Property favoriteNamespaces As %DynamicArray;
9595

96+
/// (Optional) Path to an SSH client configuration file for use with SSH connections to a Git remote
97+
Property sshConfigFile As %String(MAXLEN = "") [ InitialExpression = {##class(SourceControl.Git.Utils).SSHConfigFile()} ];
98+
9699
Method %OnNew() As %Status
97100
{
98101
set mappingsNode = ##class(SourceControl.Git.Utils).MappingsNode()
@@ -183,6 +186,7 @@ Method %Save() As %Status
183186
set @storage@("settings", "environmentName") = ..environmentName
184187
set @storage@("settings", "lockBranch") = ..lockBranch
185188
set @storage@("settings", "mappingsToken") = ..mappingsToken
189+
set @storage@("settings", "sshConfigFile") = ..sshConfigFile
186190
if ..basicMode = "system" {
187191
kill @storage@("settings", "user", $username, "basicMode")
188192
} else {
@@ -551,3 +555,4 @@ Method SaveDefaults() As %Boolean
551555
}
552556

553557
}
558+

cls/SourceControl/Git/Utils.cls

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ ClassMethod MappingsToken() As %String
195195
quit $get(@..#Storage@("settings","mappingsToken"),"")
196196
}
197197

198+
ClassMethod SSHConfigFile() As %String
199+
{
200+
quit $get(@..#Storage@("settings","sshConfigFile"),"")
201+
}
202+
198203
ClassMethod IsLIVE() As %Boolean
199204
{
200205
quit ..EnvironmentName()="LIVE"
@@ -1896,8 +1901,14 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
18961901
set privateKeyFile = $replace(privateKeyFile,"\","\\")
18971902
}
18981903
set newArgs($increment(newArgs)) = "-c"
1904+
set sshConfigFile = ..SSHConfigFile()
1905+
if sshConfigFile="" {
1906+
set sshConfigFile = "/dev/null"
1907+
} elseif $$$isWINDOWS {
1908+
set sshConfigFile = $replace(sshConfigFile,"\","\\")
1909+
}
18991910
// StrictHostKeyChecking=accept-new for good behavior on first connection
1900-
set newArgs($increment(newArgs)) = "core.sshCommand=ssh -F /dev/null -o StrictHostKeyChecking=accept-new -i "_privateKeyFile
1911+
set newArgs($increment(newArgs)) = "core.sshCommand=ssh -F "_sshConfigFile_" -o StrictHostKeyChecking=accept-new -i "_privateKeyFile
19011912
}
19021913

19031914
set username = ""
@@ -1912,6 +1923,8 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
19121923
set newArgs($increment(newArgs)) = "user.name="_username
19131924
set newArgs($increment(newArgs)) = "-c"
19141925
set newArgs($increment(newArgs)) = "user.email="_email
1926+
set newArgs($increment(newArgs)) = "-c"
1927+
set newArgs($increment(newArgs)) = "credential.interactive=false"
19151928
}
19161929

19171930
set newArgs($increment(newArgs)) = command

csp/gitprojectsettings.csp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ body {
120120

121121
if ('settings.settingsUIReadOnly) {
122122
do ##class(SourceControl.Git.Utils).Locked($get(%request.Data("lockNamespace",1)))
123-
for param="gitBinPath","namespaceTemp","privateKeyFile","pullEventClass","percentClassReplace", "defaultMergeBranch","environmentName","mappingsToken" {
123+
for param="gitBinPath","namespaceTemp","privateKeyFile","pullEventClass","percentClassReplace", "defaultMergeBranch","environmentName","mappingsToken","sshConfigFile" {
124124
set $Property(settings,param) = $Get(%request.Data(param,1))
125125
}
126126

@@ -395,6 +395,13 @@ body {
395395
}
396396
</server>
397397

398+
<div class="form-group row mb-3">
399+
<label for="sshConfigFile" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="(Optional) Path to an SSH client configuration file for use with SSH connections to a Git remote">Path to SSH Config File</label>
400+
<div class="col-sm-7">
401+
<input type="text" class="form-control" id="sshConfigFile" name="sshConfigFile" value='#(..EscapeHTML(settings.sshConfigFile))#' placeholder=""/>
402+
</div>
403+
</div>
404+
398405
<div class="form-group row mb-3">
399406
<label for="pullEventClass" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Handler class for git pull"><b>Pull Event Class</b></label>
400407
<div class="col-sm-7">

0 commit comments

Comments
 (0)