Skip to content

Error when using sshkey add #925

@VanBantam

Description

@VanBantam

When running the command:

slcli sshkey add AAAAB3NzaC1yc2EAAAADAQABAAABAQC6doGzVqgthI8mfEtOB5UCRRKTyn7s+3xOUHkEDif5Li8bju2ynQXlvR+KC+RKJ4G4BX1d/1qHFsXM/l7Kji5wuFey072IWcf0LYOUCffrQI/mMThxXQAhUBeyXMwRwRGV/MbqcEaTkg2aA4d3h3SzVjP3EKOy/VGWLMBeQnL9epx5sdNwpgOlJDfI2bezEjS4TzuJXazxKUPGGiBqT4iD/iOuP8dU+yqcudGzVkENjYoXT5XDP0kvYLhvKXfnoixINpS8yakgITzUAkUAXaocsyHPVwkRdekgjQDD0OGgwDN6DImv2JD1FscUGVX6F+PmTY/n+cCgfNFw50XJ5gBx

Note this is the public part of a throw away 2048 bit rsa key.

I get the following error:

An unexpected error has occured:
Traceback (most recent call last):
  File "//anaconda/lib/python3.5/site-packages/SoftLayer/CLI/core.py", line 163, in main
    cli.main(**kwargs)
  File "//anaconda/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "//anaconda/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "//anaconda/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "//anaconda/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "//anaconda/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "//anaconda/lib/python3.5/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "//anaconda/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "//anaconda/lib/python3.5/site-packages/SoftLayer/CLI/sshkey/add.py", line 25, in cli
    key_file = open(path.expanduser(in_file), 'rU')
  File "//anaconda/lib/python3.5/posixpath.py", line 229, in expanduser
    if not path.startswith(tilde):
AttributeError: 'NoneType' object has no attribute 'startswith'

Feel free to report this error as it is likely a bug:
    https://github.com/softlayer/softlayer-python/issues

I expect some acknowledgment that the key has been added correctly. Or an error message regarding the formatting of the key being entered.

Environment Information

Operating System: OS X 10.12.6
softlayer-python version (slcli --version): slcli (SoftLayer Command-line), version 5.3.2

This issue relates to:
#788

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions