Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken ssh key generation subcommand. #8945

Closed
drahnr opened this issue Apr 17, 2024 · 3 comments
Closed

Broken ssh key generation subcommand. #8945

drahnr opened this issue Apr 17, 2024 · 3 comments

Comments

@drahnr
Copy link
Contributor

drahnr commented Apr 17, 2024

Summary

Generating ssh keys is borked

Steps to reproduce

Expected results

Generated ssh keys

Actual results

./concourse/bin/concourse generate-key -t ssh --bits=4096 -f foo
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
reflect.(*rtype).In(0x7fff0c4385a0?, 0x3?)
	reflect/type.go:780 +0x85
github.com/jessevdk/go-flags.(*Option).call(0xc0002f9380, 0xc00093f548)
	github.com/jessevdk/[email protected]/option.go:484 +0x9f
github.com/jessevdk/go-flags.(*Option).set(0xc0002f9380, 0xc00093f548)
	github.com/jessevdk/[email protected]/option.go:277 +0x196
github.com/jessevdk/go-flags.(*Option).setDefault(0xc0002f9380, 0x11?)
	github.com/jessevdk/[email protected]/option.go:290 +0x25
github.com/jessevdk/go-flags.(*Option).clearDefault(0xc0002f9380)
	github.com/jessevdk/[email protected]/option.go:351 +0x2be
github.com/jessevdk/go-flags.(*Parser).ParseArgs.func2(0xc00093f638?, 0x7?, 0xc0002f9380)
	github.com/jessevdk/[email protected]/parser.go:313 +0x31
github.com/jessevdk/go-flags.(*Parser).ParseArgs.(*Command).eachOption.func4.1(0xc000893040)
	github.com/jessevdk/[email protected]/command.go:281 +0x53
github.com/jessevdk/go-flags.(*Group).eachGroup(0xc000893040, 0xc00093f690)
	github.com/jessevdk/[email protected]/group.go:191 +0x22
github.com/jessevdk/go-flags.(*Group).eachGroup(0xc000892fa0, 0xc00093f690)
	github.com/jessevdk/[email protected]/group.go:194 +0x53
github.com/jessevdk/go-flags.(*Parser).ParseArgs.(*Command).eachOption.func4(0xc000012a38?)
	github.com/jessevdk/[email protected]/command.go:279 +0x45
github.com/jessevdk/go-flags.(*Command).eachCommand(0xc000961e80, 0xc00093f868, 0x1)
	github.com/jessevdk/[email protected]/command.go:288 +0x28
github.com/jessevdk/go-flags.(*Command).eachOption(...)
	github.com/jessevdk/[email protected]/command.go:278
github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc0003eb260, {0xc000152010, 0x6, 0x6})
	github.com/jessevdk/[email protected]/parser.go:312 +0x87f
github.com/jessevdk/go-flags.(*Parser).Parse(...)
	github.com/jessevdk/[email protected]/parser.go:191
main.main()
	github.com/concourse/concourse/cmd/concourse/main.go:30 +0x34b

Additional context

Triaging info

  • Concourse version: 7.11.2
  • Browser (if applicable): -
  • Did this used to work? yes
@drahnr drahnr added the bug label Apr 17, 2024
@taylorsilva
Copy link
Member

Trying to reproduce:

mkdir /tmp/keys-test
cd /tmp/keys-test
curl -L 'https://github.com/concourse/concourse/releases/download/v7.11.2/concourse-7.11.2-linux-amd64.tgz' concourse.tgz
tar xzf concourse.tgz
./concourse/bin/concourse generate-key -t ssh -b 4096 -f foo

And it worked:
image

Tried again with your exact command and it still worked:
image

Where did you get your Concourse binary from? Are you on a different OS? I ran my commands on Linux, specifically Ubuntu 22.04

@taylorsilva
Copy link
Member

No further info provided and no one else reporting this as an issue.

@drahnr
Copy link
Contributor Author

drahnr commented May 8, 2024

Re-tried with 7.10.0 on fedora 39 x86_64, and it works 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants