LoginSignup
1
1

More than 5 years have passed since last update.

mbed import でエラーが発生する場合の対処方法

Posted at

mbed import コマンドでエラーが発生する場合の対処方法です。

証明書エラーが発生する場合

以下のようなエラーが発生した場合の対処方法です。

$ mbed import https://developer.mbed.org/teams/xxxx/code/yyyy/

[mbed] Importing program “yyyy" from "https://developer.mbed.org/teams/xxxx/code/yyyy/"
abort: certificate for developer.mbed.org has unexpected fingerprint 70:f0:1e:e4:c6:89:2f:12:e8:a0:64:05:f7:cf:a6:c6:ba:19:15:e6
(check hostfingerprint configuration)
fatal: https://developer.mbed.org/teams/xxxx/code/yyyy/info/refs not valid: is this a git repository?
[mbed ERROR] Unable to clone repository (https://developer.mbed.org/teams/xxxx/code/yyyy/)

mbedコマンドから呼び出している Mercirual (hg) から clone 出来てないようなので、直接呼び出してみます。

$ hg clone https://MACRUM@developer.mbed.org/teams/xxxx/code/yyyy/

abort: certificate for developer.mbed.org has unexpected fingerprint 70:f0:1e:e4:c6:89:2f:12:e8:a0:64:05:f7:cf:a6:c6:ba:19:15:e6
(check hostfingerprint configuration)

同じエラーが発生しました。調べてみると以下のような例がありました。

Mercurial のバージョンをアップデートしても問題が発生する場合は、コンフィグレーションファイル(.hgrc または、Mercurial.ini)を直接編集し、以下のように修正します。私が使用していた Windows 7 の場合は、%APPDATA% に隠し属性ファイル Mercurial.ini がありました。

[hostfingerprints]
developer.mbed.org = 70:f0:1e:e4:c6:89:2f:12:e8:a0:64:05:f7:cf:a6:c6:ba:19:15:e6

再度 mbed import を実行し、正常にインポート処理が行われたことを確認します。

503エラーが発生する場合

$ mbed deploy

[mbed] Adding library "I2CEeprom" from "https://developer.mbed.org/users/rhourahane/code/I2CEeprom" at rev #b23f5561266c
abort: HTTP Error 503: Service Unavailable
fatal: https://developer.mbed.org/users/rhourahane/code/I2CEeprom/info/refs
not valid: is this a git repository?
[mbed] ERROR: Unable to clone repository (https://developer.mbed.org/users/rhourahane/code/I2CEeprom/#b23f5561266c)

上記エラーは、mbed import で発生していますが、該当するリポジトリのみを hg clone した場合も、以下のようなエラーになりました。

$ hg clone -verbose --debug https://MACRUM@developer.mbed.org/users/rhourahane/code/I2CEeprom/

using https://developer.mbed.org/users/rhourahane/code/I2CEeprom/
proxying through http://proxy.xxxx.co.jp:8080
http auth: user MACRUM, password not set
sending capabilities command
developer.mbed.org certificate successfully verified
abort: HTTP Error 503: Service Unavailable

この場合は、proxy の設定が必要になります。先ほどの例と同様に .Mercurial.ini を修正します。

[http_proxy]
host = proxy.xxxx.co.jp:8000
passwd = password
user = username

以上です。

1
1
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
1
1