We have a new project and we host it in our own Gitlab server. I cloned it from
git@git.myacme.com:webapplication/app.git
successfully.
Let's say my username in gitlab is scott@myacme.com.
We also have an existing project in Github and the username I'm using is scott@yahoo.com
On the new project, we have an entry in package.json that is pointing to the existing project. Take note of the https
https://github.com/myacme/system-application.git
Now, when I execute npm install, it fails when it tries to pull the existing project in github.com. It's saying Invalid Username or Password .... Authentication failed. I think it's still using scott@myacme.com rather than scott@yahoo.com
I'm not allowed to change package.json. I was thinking of changing it to a git link instead of https but I will affect other developers. If I do, I'm thinking that it will use the settings I put in .ssh/config. I added 2 hosts, our myacme.com and github.com
What is the workaround for this? I've tried setting git config global user.name and user.email using my yahoo email address but it's still not using it. I'm out of ideas.
Here is the exact error in npm-debug.log file
515 error git clone --template=/Users/scott/.npm/_git-remotes/_templates --mirror https://github.com/myacme/system-application.git /Users/scott/.npm/_git-remotes/https-github-com-myacme-system-application-git-0be15bdd: remote: Invalid username or password.
515 error git clone --template=/Users/scott/.npm/_git-remotes/_templates --mirror https://github.com/myacme/system-application.git /Users/scott/.npm/_git-remotes/https-github-com-myacme-system-application-git-0be15bdd: fatal: Authentication failed for 'https://github.com/myacme/system-application.git/'