Page MenuHomeVyOS Platform

"generate public-key-command" throws unhandled exceptions when it cannot retrieve the key
Closed, ResolvedPublicBUG

Description

For example:

vyos@vyos-test-2:~$ generate public-key-command user dmbaturin path /tmp/test.pub
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/generate_public_key_command.py", line 33, in <module>
    algorithm, key, identifier = get_key(sys.argv[2])
  File "/usr/libexec/vyos/op_mode/generate_public_key_command.py", line 26, in get_key
    with open(os.path.expanduser(path), 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/test.pub'

Details

Difficulty level
Easy (less than an hour)
Version
1.3.1
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Related Objects

Mentioned In
1.3.2
1.3.2