dirk-thomas/vcstool

VCS Tool is occasionally causing ssh key errors on enterprise git server

Opened this issue · 4 comments

I tried to name this as specifically as I could though I confess I don't understand the deep details of the ssh authentication for git.

Here's the symptoms:

If VCS is run without -w 1, I will very quickly start getting this error:

Could not clone repository '[REPO HERE]': Cloning into '.'...
kex_exchange_identification: read: Connection reset by peer
Connection reset by [SERVER] port 22
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

If I wait a few minutes then delete the now ruined and empty directories, I can try again with different luck.

Running with -w 1 reduces the chances of this, but doesn't eliminate it.

I have tested locally introducing a delay parameter that stops the worker from hammering my git server, and this does seem to resolve the issue. I am still working on fixing this with on my server, but in the meantime I wanted to raise this.

I proposed #263 as a solution to this issue. PTAL.

we see similar behaviour trying to fetch a few github.com repositories using SSH authentication:

Could not determine ref type of version: kex_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.
 
Please make sure you have the correct access rights
and the repository exists.

My workaround in the PR does work. We were also able to confirm what we suspected internally, that VCS tool was being perceived as a DOS attack by our network security. Maybe github has similar protections?

We worked with our network team to whitelist our dev machines and CI runners.