foundweekends / foundweekends/giter8
--branch xyz fails with 'remote hung up unexpectedly' on ssh:// urls
- Dominant language
- Scala
- Stars
- 1.8k
- Forks
- 225
- Avg merge
- 2h 35m
- Merged PRs (30d)
- 8
Description
## steps
No steps required.
sbt 1.5.0.
## problem
`sbt new` fails when using the `--branch` switch on an `ssh://...` protocol g8 template, e.g.:
```zsh
% sbt new ssh://git@github.com/scala/scala-seed.g8.git
>>> -no problem-
% sbt new ssh://git@github.com/scala/scala-seed.g8.git --branch 2.12.x
[...]
ssh://git@github.com/scala/scala-seed.g8.git: remote hung up unexpectedly
```
(More details in stack trace)
stack trace
```zsh
% sbt -v new ssh://git@github.com/scala/scala-seed.g8.git --branch 2.12.x
[sbt_options] declare -a sbt_options=()
[process_args] java_version = '15'
[copyRt] java9_rt = '/Users/jasperstein/.sbt/1.0/java9-rt-ext-n_a_15_0_2/rt.jar'
# Executing command line:
java
-Dfile.encoding=UTF-8
-Xms1024m
-Xmx1024m
-Xss4M
-XX:ReservedCodeCacheSize=128m
-Dscala.ext.dirs=/Users/jasperstein/.sbt/1.0/java9-rt-ext-n_a_15_0_2
-jar
/usr/local/Cellar/sbt/1.5.0/libexec/bin/sbt-launch.jar
new
ssh://git@github.com/scala/scala-seed.g8.git
--branch
2.12.x
[info] welcome to sbt 1.5.0 (N/A Java 15.0.2)
[info] loading settings for project global-plugins-build-build-build from metals.sbt ...
[info] loading global plugins from /Users/jasperstein/.sbt/1.0/plugins/project/project/project
[info] loading settings for project global-plugins-build-build from metals.sbt ...
[info] loading global plugins from /Users/jasperstein/.sbt/1.0/plugins/project/project
[success] Generated .bloop/global-plugins-build-build.json
[success] Total time: 0 s, completed 26 apr. 2021 12:30:07
[info] loading settings for project global-plugins-build from build.sbt ...
[info] loading global plugins from /Users/jasperstein/.sbt/1.0/plugins/project
[success] Generated .bloop/global-plugins-build.json
[success] Total time: 0 s, completed 26 apr. 2021 12:30:08
[info] loading global plugins from /Users/jasperstein/.sbt/1.0/plugins
[info] loading project definition from /Users/jasperstein/tmp/project
[info] set current project to tmp (in build file:/Users/jasperstein/tmp/)
[info] set current project to tmp (in build file:/Users/jasperstein/tmp/)
ssh://git@github.com/scala/scala-seed.g8.git: remote hung up unexpectedly
```
## expectation
The specified branch of scala-seed.g8 is used to generate a seed project
## notes
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported `sbt new` command with and without `--branch` against the SSH template URL. Trace the `--branch` handling and SSH template fetch from that entry point; done means the specified branch is used to generate the seed project without the remote-hangup error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, scala
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100