kamakiri login
kamakiri login logs you in with your email address and saves an API key on this machine.
Usage
kamakiri login
It takes no arguments and no flags. It asks for your email address and for acceptance of the Terms of Service (Enter accepts), then sends a confirmation code to that address. Type the code to finish.
$ kamakiri login
Email: user@example.com
Terms of Service: https://kamakiri-labs.jp/en/terms/
Privacy Policy: https://kamakiri-labs.jp/en/privacy/
Accept Terms of Service? (Y/n) Y
Confirmation code sent to user@example.com.
To get a new code, press Enter without typing one.
Code: 4b1d9e2f7c8a3b6d5e0f1a2b3c4d5e6f
API key saved to ~/.config/kamakiri/credentials.json
$ kamakiri login
メールアドレス: user@example.com
利用規約: https://kamakiri-labs.jp/ja/terms/
プライバシーポリシー: https://kamakiri-labs.jp/ja/privacy/
利用規約に同意しますか? (Y/n) Y
user@example.com に確認コードを送信しました。
新しいコードを受け取るには、何も入力せずに Enter キーを押してください。
確認コード: 4b1d9e2f7c8a3b6d5e0f1a2b3c4d5e6f
APIキーを ~/.config/kamakiri/credentials.json に保存しました
There is no separate sign-up. The beta is by invitation, and your account is created the first time an invited address logs in. An address that has not been invited is refused before any code is sent; request an invitation on the beta page or at beta@kamakiri-labs.jp.
Each login mints a new key. Keys saved on other machines, and one you put in CI, stay valid. If KAMAKIRI_API_KEY is set, the new key is still saved, and one more line says that the variable decides which key commands use until you unset it. The kamakiri CLI covers where the key is kept, and Deploy covers using it in CI.
The confirmation code
- Type it on the machine where you ran
login. It does not work anywhere else. - It expires after 10 minutes.
- A wrong code asks again and says how many attempts are left, up to 5 per code.
- For a new code, press Enter at the
Code:prompt without typing anything. A new code can be sent once every 60 seconds; asked for sooner, the command counts down the seconds left and then sends it. - Running
loginagain on the same machine picks up the code already sent while it is still valid, and asks for it.
Errors
Error: Too many failed attempts for this code. Press Enter for a new code.orError: This code has expired. Press Enter for a new code.: press Enter at theCode:prompt to get a new code.Error: Too many requests. Please wait a moment and try again.: too many login requests came from your network. Wait, then runloginagain.Error: Invalid email address.: check the address and runloginagain.Error: You must accept the Terms of Service to continue.: runloginagain and accept the Terms.
Exit status
kamakiri login exits 0 once the key is saved, and 1 on every other outcome.