-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlugUpdate fails sometimes over SSH: "Could not read from remote repository" #1093
Comments
The problem is still there if I use Some more details about my system:
I can reproduce the problem with a minimal .vimrc like this:
|
I'm having a similar issue with
Doesn't happen on all plugins, but an example of one that fails is https://github.com/tpope/vim-rhubarb. |
Have the same issue with some packages updating via ssh some not of which some seem to require https; |
FYI to folks hitting this -- I believe Github is rate-limiting pulls over SSH. Like others, I have the following in my [url "ssh://git@github.com/"]
insteadOf = https://github.com/ And, for completeness, I have the following in my Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/path/to/key I am experiencing similar behavior to @alcortesm where upon
It turns out, the same things happens if try to invoke ❯ cd ~/.vim/plugged
❯ for repo in $(ls .); do echo $repo; pushd $repo > /dev/null; git pull; popd > /dev/null; printf "\n\n"; done When running the above shell command, I observed that the first ~25 repos updated nominally, then the rest (I have 49 total) failed with the same error. I was able to reproduce this several times, running the above a few minutes apart each time. If I instead run
If I insert a This SSH rate-limiting behavior can be observed trivially with the following: ❯ for i in {1..50}; do echo $i; date; ssh -T git@github.com; done
1
Fri Sep 16 11:17:08 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
2
Fri Sep 16 11:17:09 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
3
Fri Sep 16 11:17:10 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
4
Fri Sep 16 11:17:11 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
5
Fri Sep 16 11:17:12 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
6
Fri Sep 16 11:17:14 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
7
Fri Sep 16 11:17:15 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
8
Fri Sep 16 11:17:16 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
9
Fri Sep 16 11:17:17 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
10
Fri Sep 16 11:17:18 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
11
Fri Sep 16 11:17:20 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
12
Fri Sep 16 11:17:21 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
13
Fri Sep 16 11:17:22 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
14
Fri Sep 16 11:17:23 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
15
Fri Sep 16 11:17:25 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
16
Fri Sep 16 11:17:26 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
17
Fri Sep 16 11:17:27 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
18
Fri Sep 16 11:17:28 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
19
Fri Sep 16 11:17:29 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
20
Fri Sep 16 11:17:31 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
21
Fri Sep 16 11:17:32 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
22
Fri Sep 16 11:17:34 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
23
Fri Sep 16 11:17:35 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
24
Fri Sep 16 11:17:37 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
25
Fri Sep 16 11:17:39 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
26
Fri Sep 16 11:17:40 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
27
Fri Sep 16 11:17:42 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
28
Fri Sep 16 11:17:43 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
29
Fri Sep 16 11:17:45 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
30
Fri Sep 16 11:17:46 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
31
Fri Sep 16 11:17:48 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
32
Fri Sep 16 11:17:49 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
33
Fri Sep 16 11:17:50 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
34
Fri Sep 16 11:17:52 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
35
Fri Sep 16 11:17:54 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
36
Fri Sep 16 11:17:55 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
37
Fri Sep 16 11:17:57 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
38
Fri Sep 16 11:17:58 PDT 2022
Hi michaelxor! You've successfully authenticated, but GitHub does not provide shell access.
39
Fri Sep 16 11:18:00 PDT 2022
ssh_exchange_identification: read: Connection reset by peer
40
Fri Sep 16 11:18:00 PDT 2022
ssh_exchange_identification: read: Connection reset by peer
41
Fri Sep 16 11:18:00 PDT 2022
ssh_exchange_identification: read: Connection reset by peer
42
Fri Sep 16 11:18:00 PDT 2022
ssh_exchange_identification: read: Connection reset by peer
43
Fri Sep 16 11:18:01 PDT 2022
ssh_exchange_identification: read: Connection reset by peer
44
Fri Sep 16 11:18:01 PDT 2022
ssh_exchange_identification: read: Connection reset by peer
45
Fri Sep 16 11:18:01 PDT 2022
ssh_exchange_identification: read: Connection reset by peer
46
Fri Sep 16 11:18:01 PDT 2022
ssh_exchange_identification: read: Connection reset by peer
47
Fri Sep 16 11:18:02 PDT 2022
ssh_exchange_identification: read: Connection reset by peer
48
Fri Sep 16 11:18:02 PDT 2022
ssh_exchange_identification: read: Connection reset by peer
49
Fri Sep 16 11:18:02 PDT 2022
ssh_exchange_identification: read: Connection reset by peer
50
Fri Sep 16 11:18:02 PDT 2022
ssh_exchange_identification: read: Connection reset by peer Seems like a nice update here would be some attempt to detect the rate limit condition and back off / retry plugin updates that failed for this reason. The naive fix that worked for me was "wait 3 seconds between each pull". |
Follow up to my comment above - I followed this article from Puppet on re-using SSH connections in an effort to mitigate the rate-limiting by creating fewer connections during plugin update. I updated my
(and, as instructed in the linked article, manually created the While this did not completely mitigate the issue, it did seem to help and fewer plugin updates failed when I next ran |
@michaelxor I was running into this same issue, your fix of reusing ssh connections along with setting the job concurrency of vim-plug to 4 or less solved the problem for me. Thanks! |
Some additional information when re-using the SSH connections, it looks like Github is just using the default maximum of 10 concurrent sessions in OpenSSH. From
When I set the job currency to 10 ( I wonder if it is possible to have the default job concurrency set to 10 as well or have a vim-plug configuration where I can set the concurrency myself in |
let g:plug_threads = 10 Note The name is a bit misleading because we're not really using "threads" in the recent versions of Vim. But we used to use threads in Ruby and Python installer that was used before Vim 8 or Neovim introduced the concept of "jobs", and the name stuck. |
I have configured git to use SSH instead of HTTP when connecting to Github:
I use
gpg-agent
to remember my private SSH key for a certain amount of hours, so I only have to write my passphrase once a day to access my SSH key:But when I tell vim-plug to check for updates I get inconsistent behaviour:
pinentry
window to ask me for my SSH passphrase even though my gpg-agent already knows the SSH private key.Every time I try to PlugUpdate, different plugins show different behaviour from the list above and I haven't been able to find any patterns. I use 12 plugins, every time I try to update them I get 1-3 errors and 1-2 pinentry windows popups.
The problem only happens if I configure git to use SSH instead of HTTP, if I disable that, all plugins are correctly updated.
The text was updated successfully, but these errors were encountered: