For an automatic deployment script on a machine, I would like to login to snap (not snapcraft) and pull my private snap.
echo -e “password” | snap login mymail@provider.com
does not work and bring error : inappropriate ioctl for the device
Is there anyway to make snap login read from stdin the password ?
Best
PS : I’m actually trying to interactively ask the password at the beginning of the script, then providing to snap login later in the script.
1 Like
Saviq
October 18, 2019, 10:34am
2
Check out snapcraft export-login --help
.
theoriz
October 21, 2019, 10:27am
3
But is there an option to use this feature without installing snapcraft ?
Since I’m deploying on external machine, i just need to pull my (private) snap
It seems like overkill to deploy snapcraft on user machines that just need to run the snap package we have built.
Any advise ?
chipaca
October 21, 2019, 12:42pm
4
I’m not sure I understand what you’re trying to do.
If this is for deploying on a machine, why wouldn’t you use the seeding mechanism?
Our snap is private , so I need to login to my account.
The export-login mechanism is very fine, but does not seem to work to install/pull a private snap, and needs to install snapcraft, so it’s not suitable in our case.
Are we doing something too much weird or wrong ?
edit : Let me get some documentation with this seeding mechanism and coming back, I apparently skipped that part.
hmm I did not find any documentation, what is the seeding mechanism ?
My use case is :
Deploy a new machine
install our private snap
Give the the machine to the user
edit : By seeding algorithm are you referring to the gadget snap features ?