nodegit icon indicating copy to clipboard operation
nodegit copied to clipboard

error: failed to mmap. Could not write data: Permission denied

Open bharathkv6 opened this issue 4 years ago • 3 comments

error: failed to mmap. Could not write data: Permission denied.

Getting this error while executing the following code

repository.fetchAll({
    callbacks: {
      certificateCheck: function () {
        return 0;
      },
      credentials: function (_url: string, userName: string) {
        return Git.Cred.sshKeyNew(
          userName,
          sshPublicKeyPath,
          sshPrivateKeyPath,
          ''
        );
      }
    }
  })

bharathkv6 avatar Jan 03 '22 09:01 bharathkv6

This is most likely a file permission issue. Please fill out the issue template when submitting issues:

System information

  • node version:
  • npm or yarn version:
  • OS/version/architecture:
  • Applicable nodegit version:
node -v
npm -v # (or yarn -v)
node -e "console.log(process.platform)"
node -e "console.log(require('os').release())"
node -e "console.log(console.log(process.arch))"

ianhattendorf avatar Feb 10 '22 21:02 ianhattendorf

I'm also getting this error when running yarn hardhat test on this repo, which uses nodegit to clone a repo.

node -v
v16.17.1
npm -v # (or yarn -v)
8.15.0
node -e "console.log(process.platform)"
linux
node -e "console.log(require('os').release())"
5.15.68.1-microsoft-standard-WSL2
node -e "console.log(console.log(process.arch))"
x64
undefined

DmitriyShepelev avatar Oct 21 '22 21:10 DmitriyShepelev

Update: this SO answer solved the issue for me.

DmitriyShepelev avatar Oct 24 '22 14:10 DmitriyShepelev