I am facing an issue with the snapcraft export-login and login command. I have exported my snapcraft credentials using the following command:
snapcraft export-login snaplogin
However, when I try to login with the following command:
snapcraft login --with snaplogin
I receive the following error message:
Cannot parse config: File contains no section headers.
I have tried checking the format of the file and the contents, but the issue still persists.
snapcraft version : snapcraft 7.2.9
snapcraft log:
2023-02-11 23:53:15.585 Traceback (most recent call last):
2023-02-11 23:53:15.585 File "/snap/snapcraft/8619/lib/python3.8/site-packages/snapcraft/store/_legacy_account.py", line 53, in _load_potentially_base64_config
2023-02-11 23:53:15.585 parser.read_string(decoded_config_content)
2023-02-11 23:53:15.585 File "/snap/snapcraft/8619/usr/lib/python3.8/configparser.py", line 723, in read_string
2023-02-11 23:53:15.585 self.read_file(sfile, source)
2023-02-11 23:53:15.585 File "/snap/snapcraft/8619/usr/lib/python3.8/configparser.py", line 718, in read_file
2023-02-11 23:53:15.585 self._read(f, source)
2023-02-11 23:53:15.585 File "/snap/snapcraft/8619/usr/lib/python3.8/configparser.py", line 1082, in _read
2023-02-11 23:53:15.585 raise MissingSectionHeaderError(fpname, lineno, line)
2023-02-11 23:53:15.585 configparser.MissingSectionHeaderError: File contains no section headers.