Import SSH keys [] (lp:user-id or gh:user-id):

Bug #1700494 reported by Riccardo Magrini
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Undecided
Unassigned

Bug Description

after to run the command:

$: sudo maas init --mode all

and inserted some information, when the system asked me to import of SSH key from launchpad I've obtained that issue :

Import SSH keys [] (lp:user-id or gh:user-id): lp:riccardo-magrini
Traceback (most recent call last):
  File "/snap/maas/91/bin/maas-region", line 55, in <module>
    main()
  File "/snap/maas/91/bin/maas-region", line 51, in main
    run()
  File "/snap/maas/91/bin/maas-region", line 45, in run
    management.execute_from_command_line()
  File "/snap/maas/91/lib/python3.5/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/snap/maas/91/lib/python3.5/site-packages/django/core/management/__init__.py", line 330, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/snap/maas/91/lib/python3.5/site-packages/django/core/management/base.py", line 390, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/snap/maas/91/lib/python3.5/site-packages/django/core/management/base.py", line 441, in execute
    output = self.handle(*args, **options)
  File "/snap/maas/91/lib/python3.5/site-packages/maasserver/management/commands/createadmin.py", line 177, in handle
    user=user, protocol=protocol, auth_id=auth_id)
  File "/snap/maas/91/lib/python3.5/site-packages/maasserver/models/keysource.py", line 34, in save_keys_for_user
    return source.import_keys(user)
  File "/snap/maas/91/lib/python3.5/site-packages/maasserver/models/keysource.py", line 73, in import_keys
    for key in keys]
  File "/snap/maas/91/lib/python3.5/site-packages/maasserver/models/keysource.py", line 73, in <listcomp>
    for key in keys]
  File "/snap/maas/91/lib/python3.5/site-packages/django/db/models/manager.py", line 127, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/snap/maas/91/lib/python3.5/site-packages/django/db/models/query.py", line 348, in create
    obj.save(force_insert=True, using=self.db)
  File "/snap/maas/91/lib/python3.5/site-packages/maasserver/models/cleansave.py", line 28, in save
    self.full_clean()
  File "/snap/maas/91/lib/python3.5/site-packages/django/db/models/base.py", line 1147, in full_clean
    raise ValidationError(errors)
django.core.exceptions.ValidationError: {'key': ['Invalid SSH public key: Key could not be converted to RFC4716 form.']}

my Launchpad Id is:
riccardo-magrini

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Riccardo,

Judging by the message, it seems your key does not conform to RFC4716. Is this the case? I have not looked at your key but I'm guessing it contains non-standard comments in it, which is the source of failure.

Can you confirm ?

Changed in maas:
status: New → Incomplete
Revision history for this message
Riccardo Magrini (riccardo-magrini) wrote :

I had generated a new key on my personal launchpad and removed the old one. With that one the procedure went well. I don't know what was the error maybe as you said me the key not was a standard conform.

Changed in maas:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.