Friday, 14 April 2017

Git pull works from command line but not when wrapped in npm command

Windows Server 2012 R2, Gitlab.com repo (ssh remote), git 2.7.0.windows.2, npm 3.10.10, node v6.10.2

In my repo directory I can successfully:

git pull origin master

In my npm package.json I have:

{
    "scripts": {
        ...
        "update": "git pull origin master && npm install"
        ...
    }
}

And npm run update returns

Permission denied (publickey).
fatal: Could not read from remote repository.

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



via Michael Tallino

No comments:

Post a Comment