首页 > 解决方案 > 在 github 中删除 repo 后,Android Studio 警告“...Repository not found.”,我如何指定从 Android Studio 中的另一个 repo 获取

问题描述

我在android studio中点击VCS→Git→Fetch,打印事件日志:

17:31   Fetch Failed
            origin: remote: Repository not found.
            repository 'https://github.com/xxxxxx/yyyyyy.git/' not found

这里的“https://github.com/xxxxxx/yyyyyy.git/”是我删除的存储库,但Android Studio IDE似乎不知道。我应该怎么做才能让 Android Studio 从另一个现有存储库中获取?

标签: androidgithub

解决方案


如果您删除了远程存储库和获取,那么显然将找不到远程存储库。您需要将远程的 URL 更改为新存储库。

使用 SSH

git remote set-url origin git@github.com:USERNAME/REPOSITORY.git

使用 HTTPS

git remote set-url origin https://github.com/USERNAME/REPOSITORY.git

如果您想通过 android-studio 进行操作,请参阅https://stackoverflow.com/a/53913296/7641405


推荐阅读