this post was submitted on 18 Jul 2023
6 points (100.0% liked)

Emacs

1978 readers
8 users here now

Our infinitely powerful editor.

founded 4 years ago
MODERATORS
 

Hi,

I'm using the function below (found on somewhere else)

(defun my-magit-fetch-all-repositories ()
  "Run `magit-fetch-all' in all repositories returned by `magit-list-repos`."
  (interactive)
  (dolist (repo (magit-list-repos))
    (message "Fetching in %s..." repo)
    (let ((default-directory repo))
      (magit-fetch-all (magit-fetch-arguments)))
    (message "Fetching in %s...done" repo)))

This was working fine and successfully fetching from all of my repos. But recently it randomly generates an error on a random repo with the message of:

magit fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

If I try to magit-fetch-all manually then it works and does not throw the error since I have correct rights and ssh key. If I re-run my-magit-fetch-all-repositories, it randomly generates same error on different repo or repos.

Have any idea on this?

top 2 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 1 points 1 year ago (1 children)

github? They recently reset their keys. You may need to update multiple "known hosts" as there can be multiple entries in your ~/.ssh/known_hosts file for them as there are multiple IPs they use and you won't consistently get the same ones, which could lead to the behavior you see.

[โ€“] [email protected] 1 points 1 year ago

Self hosted gitea but I'm gonna check this. Ty