miseでPythonを指定すると「'origin' does not appear to be a git repository」が出た場合の対処
miseでPythonのバージョンを指定すると「fatal: 'origin' does not appear to be a git repository
」エラーが出るようになってしまいました。このエラーの対処方法をメモしておきます。
検証環境¶
対象 | バージョン |
---|---|
macOS | Sequoia 15.5 |
mise | 2025.7.0 macos-arm64 (2025-07-01) |
エラーメッセージ¶
miseでmise use python@latest
のようにPythonバージョンを指定するとエラーメッセージが出るようになってしまいました。この状態でmise doctor
しても特に問題は検知されませんでした。
% mise use python@latest
mise ERROR git failed: Cmd(["git", "-C", "/Users/USERNAME/Library/Caches/mise/python/pyenv", "-c", "safe.directory=/Users/USERNAME/Library/Caches/mise/python/pyenv", "fetch", "--prune", "--update-head-ok", "origin", "master:master"]) fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information
対処方法¶
Error getting latest version for python: git failed #2962に書かれていますが、以下を実行します。
rm -r ~/Library/Caches/mise/python/pyenv
これでエラーメッセージが出なくなりました。
% mise use python@latest
mise ~/Desktop/sample/mise.toml tools: python@3.13.5