Save your UpCloud API credentials on your disk and insert them into your environment whenever needed.
Why?
Because I'm lazy, but I don't want to keep the credentials in my environment all the time, but only when I need them. This is just a stupid script that exports the credentials to my environment when I need them.
git clone git@github.com:jzmch/upcloud-credentials.git ~/.upcloudYou can copy the sample file to give yourself a starting point.
cp ~/.upcloud/credentials_sample ~/.upcloud/credentials# ~/.upcloud/credentials
UPCLOUD_USERNAME="your username that has API Access"
UPCLOUD_PASSWORD="your password"upcloud() {
if [[ -f ~/.upcloud/credentials ]] && [[ -f ~/.upcloud/upcloud_credentials.sh ]]; then
. ~/.upcloud/upcloud_credentials.sh
fi
}Just open a new shell and type:
$ upcloudand you're done! :D