Skip to content

Commit c565d46

Browse files
committed
G2-1859 Use GitSSHCrendetials to create transport config
1 parent 92438c9 commit c565d46

File tree

1 file changed

+3
-2
lines changed
  • bd-build/src/main/java/com/g2forge/bulldozer/build/model

1 file changed

+3
-2
lines changed

bd-build/src/main/java/com/g2forge/bulldozer/build/model/Context.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.io.IOException;
44
import java.nio.file.Path;
5+
import java.nio.file.Paths;
56
import java.util.LinkedHashMap;
67
import java.util.List;
78
import java.util.Map;
@@ -28,7 +29,7 @@
2829
import com.g2forge.gearbox.command.converter.dumb.DumbCommandConverter;
2930
import com.g2forge.gearbox.command.process.ProcessBuilderRunner;
3031
import com.g2forge.gearbox.command.proxy.CommandProxyFactory;
31-
import com.g2forge.gearbox.git.HGit;
32+
import com.g2forge.gearbox.git.GitSSHCredentials;
3233

3334
import lombok.AllArgsConstructor;
3435
import lombok.Builder;
@@ -89,7 +90,7 @@ protected final Map<String, P> computeProjects() {
8990
protected TransportConfigCallback computeTransportConfig() {
9091
final String key = new PropertyStringInput("ssh.key.file").fallback(new UserPasswordInput("SSH Key File")).get();
9192
final String passphrase = new PropertyStringInput("ssh.key.passphrase").fallback(new UserPasswordInput(String.format("SSH Passphrase for %1$s", key))).get();
92-
return HGit.createTransportConfig(key, passphrase);
93+
return new GitSSHCredentials(Paths.get(key), passphrase).createTransportConfigCallback();
9394
}
9495

9596
public void failIfDirty() {

0 commit comments

Comments
 (0)