foundweekends / foundweekends/giter8

sbt new ssh invalid private key

Open
#548 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
1.8k
Forks
225
Avg merge
2h 35m
Merged PRs (30d)
8

Description

## steps

```
$ sbt -version
sbt version in this project: 1.5.1
sbt script version: 1.5.1
```

## problem

Can't create project from private Gitlab repository using ssh.

- ssh connection succeed
```
ssh -p 7999 -T git@my-gitlab.com
Welcome to GitLab, @chepk!
```

- git clone ssh://.. execution succeed
```
git clone ssh://git@my-gitlab.com:7999/performance/gatling-template.g8.git
```

- sbt new https://... execution succeed
```
sbt new https://my-gitlab.com:7999/performance/gatling-template.g8.git
```

- sbt new ssh://... execution crashes with `invalid privatekey` message
```
sbt new ssh://git@my-gitlab.com:7999/performance/gatling-template.g8.git
```

stack trace

```
$ sbt new ssh://git@my-gitlab.com:7999/performance/gatling-template.g8.git
[info] welcome to sbt 1.5.1 (N/A Java 15.0.2)
[info] loading project definition from /Users/chepk/work/temp/project
[info] set current project to temp (in build file:/Users/chepk/work/temp/)
[info] set current project to temp (in build file:/Users/chepk/work/temp/)

ssh://git@my-gitlab.com:7999/performance/gatling-template.g8.git : invalid privatekey: [B@718f3088
```

The private key was generated using `ssh-keygen -t rsa`

## expectation

Project is created successfully using sbt new ssh://..

## notes

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.