2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

FirebaseでCDしようとするとbase64: invalid inputで失敗する

Posted at

はじめに

Next.jsをGithub ActionsでCDしようとしたときにつまづいたのでまとめます

問題

以下のアクションでエラーがでました

          echo "${{ secrets.FIREBASE_KEY }}" | base64 -d > ./firebase-key.json

エラーは

base64: invalid input
Error: Process completed with exit code 1.

FIREBASE_KEYはBasr64にエンコードした鍵です

解決方法

鍵のコピーが誤っていました

hogehogegegegejdklajfadsjf
 //ここに1行空行が必要

手でコピーしていたため最後の空行を含めずにGithubのシークレットに登録していました

以下のコマンドでクリップボードにコピーしたことから気づきました

$ base64 account-auth.json | xsel --clipboard --input

おわりに

まだ沼っているところがあるのでこれから解決してハンズオン記事にしたいなとかんがえています

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?