This is a story of the day a user was about to battle the charmcraft-login-beast to retrieve a CHARMHUB_TOKEN. (to be able to update our CI/CD action in github.)
This is a story about bravery, perils of charmcraft and how only the most rough-necked users gets to live and tell the story.
The story about the user and the charmcraft-login-beast.
One day, a user was about to login to update the CHARMHUB_TOKEN credential. Its was needed to build charms in github.
charmcraft login --ttl <seconds> --export ./token.file
The user knew that he needed to interact with charmcraft and switch user. He knew that this was a treacherous journey, so he made all the preparations. The charmcraft-login-beast was waiting.
At the beginning of the terminal session, he met the beast.
He did a few login attempts, but the beast was not letting him through to switch to the correct user. He was always pushed back to the first user. There was no way to switch. Also, there was no way to perform the login as a specific user or any help to get.
The user cried for help: charmcraft help login
But there was none to find.
The battle was raging for a long time. The browser login attempts failed in many ways, mostly the beast responded with “invalid login state” - causing severe blows to the user. The beast had slain many users before.
The user knew that it was not going to help knowing the regular “username”, so he tried the “Use email” maneuver, but the beast responded quickly and witty. The beast was winning.
The battle raged on with errors, no explanations, and no help to the user. The battle seemed to be lost!
The user was just about to give up when the machine saint “Private browser window” appeared and whispered in his ear:
– I have seen your fight with the beast, and I have come to help you. Listen carefully:
– Thou shall use this combination, and no other combination, to slay the beast and that shall grant you the CHARMHUB_TOKEN:
- Thou must log out from charmcraft. (charmcraft logout) or the beast will win.
- Thous must use the link from the terminal output, it must be from terminal. Not browser or the beast will win.
- Thou must not try using the username, use only email and correct password. The beast will not let you know you have the wrong password, so you have to be certain or the beast will win.
- Thou must use a “Private browser window” because the beast will not allow you to change user in any other way and you will lose.
After doing what the saint had said, and after some 40 minutes fight, the user was able to defeat the charmcraft-login-beast and access the treasure CHARMHUB_TOKEN.
The user was happy, but severely damaged. He returned to his terminal and at old age, settled for Ansible. He told the story to his grand-kids of the day he battled charmcraft and just barely survived.