Using snapcraft in a headless environment requires the use of snapcraft login. Since upgrading to 7.0.7 the following message is displayed when attempting login:
Traceback (most recent call last):
File "/snap/snapcraft/7717/bin/snapcraft", line 8, in <module>
sys.exit(run())
File "/snap/snapcraft/7717/lib/python3.8/site-packages/snapcraft/cli.py", line 188, in run
dispatcher.run()
File "/snap/snapcraft/7717/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 406, in run
return self._loaded_command.run(self._parsed_command_args)
File "/snap/snapcraft/7717/lib/python3.8/site-packages/snapcraft/commands/account.py", line 115, in run
store.StoreClientCLI().login()
File "/snap/snapcraft/7717/lib/python3.8/site-packages/snapcraft/commands/store/client.py", line 187, in login
credentials = self.store_client.login(
File "/snap/snapcraft/7717/lib/python3.8/site-packages/snapcraft/commands/store/_legacy_account.py", line 149, in login
raise NotImplementedError("Cannot login with legacy")
NotImplementedError: Cannot login with legacy