LoginSignup
0

More than 5 years have passed since last update.

AndroidStudioのGradleでDeployGateにログイン・アップロードできない時の対処法

Posted at

はじめに

AndroidStudioのGradle taskにて、updateDeployGateDebug, loginDeployGateを叩いたらこんなエラーが出た時に見るべし

log
Failed to retrieve DeployGate credentials. Please try again or specify it in your build.gradle script.

あるいはDeploygateを初めて使うのにログインするためのブラウザが起動しない場合

原因?らしきもの

AndroidStudioのgradleからブラウザが起動できないのが原因っぽい。
んで、起動できないから当然ログインもできない→エラーシーケンスに流れる

対処法

デプロイゲートのコマンドラインツールからログインしてやればよさそう。
というかコマンドラインをインストールしてないのが原因?かもしれない

具体的な作業

https://docs.deploygate.com/docs/cli
を参考にdgコマンドをインストールする

$ curl -sSL https://deploygate.com/cli/install/9fb6413b | bash

Permissionエラーをもらったらsudoをつけて実行する。

$sudo curl -sSL https://deploygate.com/cli/install/9fb6413b |sudo bash

ログインしておく(参考:https://docs.deploygate.com/docs/cli-other-commands)

dg login

たぶんブラウザが起動するはず。で、ログインできると、コマンドライン側にWelcome to Deploygate!って歓迎される

$ dg login
Welcome to DeployGate!
         _            _                       _
        | |          | |                     | |
      __| | ___  ___ | | ___ _   ,____   ___ | |_ ___
     / _` |/ _ \' _ \| |/ _ \ \ / / _ \ / _ `| __/ _ \
    | (_| |  __/ |_) | | (_) \ v / (_| | (_| | |_' __/
     \___, \___| .__/|_|\___/ ` / \__, |\__,_|\__\___`
               |_|           /_/  |___/
Hello kkeisuke!

この状態でもう一度AndroidStudio側のupdateDeployGateDebugを叩けば通る・・・はず。

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
0