Could not read Username for 'https://github.com': No such device or address fatal: clone

Hello, I’m flying blind here trying to understand netlify :slight_smile:

I’ve read a lot trying to figure out what is going with this error and try come of “Google” solutions but I can’t get this working with my Github/Netligy/VSCode publishing thing!
Is possible to point me the right direction or even tell me what I’m doing wrong? Thanks

netlify - bejewelled-lily-877f08

4:50:13 PM: build-image version: 68a2c262fa3c95a08a1716b8dde8fba0e332ec73 (focal)
4:50:13 PM: buildbot version: 68a2c262fa3c95a08a1716b8dde8fba0e332ec73
4:50:13 PM: Fetching cached dependencies
4:50:13 PM: Failed to fetch cache, continuing with build
4:50:13 PM: Starting to prepare the repo for build
4:50:13 PM: No cached dependencies found. Cloning fresh repo
4:50:13 PM: git clone --filter=blob:none https://github.com/AndreScalaPT/andrescala.pt
4:50:13 PM: Preparing Git Reference refs/heads/main
4:50:14 PM: Error checking out submodules: 
4:50:14 PM: Failing build: Failed to prepare repo
4:50:14 PM: Failed during stage 'preparing repo': Error checking out submodules: : Submodule 'themes/PaperMod' (https://github.com/AndreScalaPT/website.git) registered for path 'themes/PaperMod'
Cloning into '/opt/build/repo/themes/PaperMod'...
fatal: could not read Username for 'https://github.com': No such device or address
fatal: clone of 'https://github.com/AndreScalaPT/website.git' into submodule path '/opt/build/repo/themes/PaperMod' failed
Failed to clone 'themes/PaperMod'. Retry scheduled
Cloning into '/opt/build/repo/themes/PaperMod'...
fatal: could not read Username for 'https://github.com': No such device or address
fatal: clone of 'https://github.com/AndreScalaPT/website.git' into submodule path '/opt/build/repo/themes/PaperMod' failed
Failed to clone 'themes/PaperMod' a second time, aborting
: exit status 1
4:50:14 PM: Finished processing build request in 1.634s

You probably got a typo in your AndreScalaPT/website GitHub repo name, or it is a private repository, and you need to supply a PAT (personal access token) to Netlify (e.g. as a ‘sensitive’ environment variable) in order for Netlify to access the repo, since it is a submodule.

Hi you can also try this here: Repository permissions and linking | Netlify Docs to configure your repo.

1 Like

Hi, thanks to Daniel that point me in a good direction I was able to find that documentation and now I have a different error:

I’ve created an ssh-rsa key in netlify and added in GitHub; I’ve also added in the environment variables the NETLIFY_AUTH_TOKEN with the same token that I’ve generated.

10:29:15 PM: build-image version: 68a2c262fa3c95a08a1716b8dde8fba0e332ec73 (focal)
10:29:15 PM: buildbot version: 68a2c262fa3c95a08a1716b8dde8fba0e332ec73
10:29:15 PM: Fetching cached dependencies
10:29:15 PM: Failed to fetch cache, continuing with build
10:29:15 PM: Starting to prepare the repo for build
10:29:15 PM: No cached dependencies found. Cloning fresh repo
10:29:15 PM: git clone --filter=blob:none https://github.com/AndreScalaPT/andrescala
10:29:15 PM: Preparing Git Reference refs/heads/main
10:29:17 PM: Error checking out submodules: 
10:29:17 PM: Failing build: Failed to prepare repo
10:29:17 PM: Failed during stage 'preparing repo': Error checking out submodules: : Submodule 'themes/PaperMod' (https://github.com/AndreScalaPT/andrescala.git) registered for path 'themes/PaperMod'
Cloning into '/opt/build/repo/themes/PaperMod'...
fatal: remote error: upload-pack: not our ref 031e2ba57ea2b7b1de2e73c20bf2b5716f654fac
fatal: Fetched in submodule path 'themes/PaperMod', but it did not contain 031e2ba57ea2b7b1de2e73c20bf2b5716f654fac. Direct fetching of that commit failed.
: exit status 128
10:29:17 PM: Finished processing build request in 2.105s

Just for context, I’m using Hugo generating the theme PaperMod with VSCode and then commit to GitHub.

Have you reviewed Host on Netlify | Hugo (gohugo.io) and Hugo on Netlify | Netlify Docs also setting the HUGO_VERSION environment variable will be important.

But first, it looks like you’ve got some mixed-up git submodule configuration in your repository.

Can you share a link to your repository? And, do you have a working local build and/or use of hugo serve ?