If the miktex api is actually online and displaying valid mirrors, the api might just be bugged. At the time of writing both the GetRepository4 and the VerifyRepository2 action in the api seem to be broken. However, the PickRepository4 action works fine, and since the api returns it, the application assumes it is a valid repository. You can verify if that is the case for you by opening a command console and running mpm --pick-repository-url
in the appropriate directory. If it displays an url instead of an error this solution should work for you.
Instead of doing the following steps, you can simply uninstall miktex, and check the option that it should clean up after itself. It will delete all temporary files, and the register keys it uses. The downside is that after re-installing miktex, you'll need to install all packages again. Yaaaaaay... :(
Editing the register might cause all kinds of problems, including all kinds of things crashing. Always make a backup before editing the register. If in doubt, go for the safe route and read the previous paragraph.
To get your installation working again, open regedit.exe (e.g. via Windows + R).
Navigate to Computer\HKEY_CURRENT_USER\SOFTWARE\MiKTeX.org\MiKTeX\2.9\MPM\
. It should contain three keys, namely RemoteRepository
, RepositoryReleaseState
and RepositoryType
. Delete these keys.
MiKTeX package manager (MPM) will now default to asking the api for the closest repository instead of using the one you previously defined, which will work in most cases.