Build failed -- failed during stage 'preparing repo': error checking for ref: fatal: could not read Username for 'https://github.com': No such device or address

failed during stage ‘preparing repo’: error checking for ref: fatal: could not read Username for ‘https://github.com’: No such device or address

Anybody encountered this?

hi! that’s an odd error, we don’t see that very often. “preparing repo” always means we can’t get access to your repo on github (or other service) for some reason.

Sometimes this is because you haven’t pushed anything in a while and something expired somewhere, if i were you, i would log in to github, remove the access for netlify to the repo you are trying to deploy, then re-authenticate it again and see if that fixes things. give that a try?

Yeah thanks, took those steps and that appears to have allowed the build to proceed.

1 Like

I ran into this same issue after I decided to convert my Gatsby sites content/images to a standalone private Github repository and added it as as submodule.

Even with Netlifys deploy key and with Netlify added as an integration on the new repository, I kept getting the " ‘https://github.com’: No such device or address" error when Netlify tried to build my site.

I resolved it by wiping out the submodule and adding it back using the ssh auth scheme, “git submodule add git@github.com:benlavalley/somerepo.git” as opposed to adding it via the https auth scheme (“git submodule add https://github.com/benlavalley/somerepo.git”).

Great work, @djben! That would also have been my suggestion.