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

"Unable to parse private key" error when attempting to create cluster manager on macOS. #167

Open
john-terrell opened this issue Jul 14, 2021 · 3 comments

Comments

@john-terrell
Copy link

john-terrell commented Jul 14, 2021

This repos on latest master and v1.0.1-pre1 with macOS 11.4 as the host.

$ triton-kubernetes create manager
✔ Backend Provider: Local
✔ Cloud Provider: Triton
Cluster Manager Name: DemoClusterManager
Private Registry: None
Rancher Agent Image: Default
Set UI Admin Password: ********
Triton Account Name: <some account here>
Triton Key Path: ~/.ssh/id_rsa
Triton URL: https://<api address>
unable to parse private key: asn1: structure error: tags don't match (16 vs {class:1 tag:15 length:112 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @2

I've tried feeding it the root id_rsa key as well as a special custom RSA private key.

@mariuspana
Copy link

I believe you need your keys in the "old" ssh format, MD5.

@outbackdingo
Copy link

same still seems broken

triton-kubernetes create manager
✔ Backend Provider: Local
✔ Cloud Provider: Triton
✔ Cluster Manager Name: admin
✔ Private Registry: None
✔ Rancher Server Image: Default
✔ Rancher Agent Image: Default
✔ Set UI Admin Password: **********
✔ Triton Account Name: admin
✔ Triton Key Path: ~/.ssh/id_rsa
✔ Triton URL: https://cloudapi.cloud.cloud.com
unable to parse private key: asn1: structure error: tags don't match (16 vs {class:1 tag:15 length:112 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue: tag: stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @2
❯ triton-kubernetes create manager --non-interactive --config manager-on-triton.yaml
Running in non interactive mode
Using config file: manager-on-triton.yaml
unable to parse private key: asn1: structure error: tags don't match (16 vs {class:1 tag:15 length:112 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue: tag: stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @2

cat manager-on-triton.yaml

This sample config file will create a Cluster Manager on Joyent's Public Cloud (triton)

backend_provider: local
name: manager-on-triton
manager_cloud_provider: triton
private_registry: ""
private_registry_username: ""
private_registry_password: ""
rancher_server_image: ""
rancher_agent_image: ""
triton_account: admin
triton_key_path: ~/.ssh/id_rsa
triton_key_id: b6:eb:c4:c3:b0:c8:32:ad:39:d1:77:6f:78:db:1e:b5
triton_url: https://cloudapi.cloud.cloud.com
triton_network_names:

  • internal
  • external
    triton_image_name: ubuntu-certified-18.04
    triton_image_version: 20190627.1.1
    triton_ssh_user: ubuntu
    master_triton_machine_package: sample-bhyve-flexible-1G
    rancher_admin_password: admin

@pulquero
Copy link

pulquero commented Apr 8, 2022

Same issue here, too, MacOS, triton-kubernetes v0.9.0-pre2 from brew install.

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

No branches or pull requests

4 participants