title: How to install npm pckage from private git repoistory using a token in github actions
body: <p>I'm trying to install npm packages for my application within a Dockerfile. However, I get the following error when it comes to installing a package from a private git repository.</p>
  
  <pre><code> Step 9/10 : RUN npm ci
   ---&gt; Running in 57960fe4df81
  npm ERR! Error while executing:
  npm ERR! /usr/bin/git ls-remote -h -t ***github.com/&lt;redacted-private-org&gt;/&lt;redacted-private-repo&gt;.git
  npm ERR! 
  npm ERR! remote: Repository not found.
  npm ERR! fatal: repository 'https://github.com/&lt;redacted-private-org&gt;/&lt;redacted-private-repo&gt;.git/' not found
  npm ERR! 
  npm ERR! exited with error code: 128
  </code></pre>
  
  <p><strong>Dockerfile</strong></p>
  
  <pre><code>FROM node:12.18.0-alpine3.10
  
  RUN apk update &amp;&amp; apk upgrade &amp;&amp; \
      apk add --no-cache bash git openssh
  
  RUN mkdir -p /home/dev
  
  WORKDIR /home/dev
  
  COPY . /home/dev
  
  RUN npm ci
  
  CMD ["node", "api/api.js"]
  </code></pre>
  
  <p><strong>package.json</strong></p>
  
  <pre><code>{
    "name": "api",
    "version": "0.1.0",
    "author": "me",
    "license": "",
    "scripts": {
      "prestart": "",
      "start": "NODE_ENV=development nodemon ./api/server.js",
    },
    "dependencies": {
      "bcrypt-nodejs": "^0.0.3",
      "body-parser": "^1.18.2",
      "org-common-utils": "git+https://&lt;redacted-username&gt;:&lt;redacted-token&gt;@github.com/&lt;redacted-private-org&gt;/&lt;redacted-private-repo&gt;.git",
      "cors": "^2.8.4",
      "dotenv": "^8.2.0",
      "express": "^4.16.3",
      "express-routes-mapper": "^1.1.0",
      "helmet": "^3.12.0",
      "igdb-api-node": "^3.1.7",
      "jsonwebtoken": "^8.2.1",
      "mysql": "^2.16.0",
      "mysql2": "^1.6.4",
      "node-cache": "^4.2.0",
      "sequelize": "^5.21.3",
      "sqlite3": "^4.0.0",
    },
    "devDependencies": {
      "cross-env": "^5.1.4",
      "eslint": "^4.19.1",
      "eslint-config-airbnb-base": "^12.1.0",
      "eslint-plugin-import": "^2.18.0",
      "husky": "^0.14.3",
      "jest": "^22.4.3",
      "nodemon": "^1.17.3",
      "shx": "^0.2.2",
      "supertest": "^3.0.0"
    }
  }
  </code></pre>
  
  <p>To install from a private Github repository I'm using a username and token combination as you can see in my package.json. </p>
  
  <p>The repository exists because if I try to navigate to the URL it loads when I'm logged in 
  <a href="https://github.com/redacted-private-org/redacted-private-repo" rel="nofollow noreferrer">https://github.com/redacted-private-org/redacted-private-repo</a></p>
  
  <p>This issue is only occurring in github actions pipeline.</p>