Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git authentication fails during Bower install only (exit code #128)

I'm building a project that has a Git repository as a dependency:

"dependencies": {
    "base-resources": "[email protected]:bower-projects/base-resources.git"
}

The build fails like so:

bower ECMDERR Failed to execute "git ls-remote --tags --heads [email protected]:bower-projects/base-resources.git", exit code of #128 Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,password). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

Additional error details: Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
fatal: Could not read from remote repository.

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

However, I can run the same command from Git bash with no issues:

git ls-remote --tags --heads [email protected]:bower-projects/base-resources.git

I've tried all the common solutions, such as changing the Git URL protocol, clearing the Bower cache, and setting specific local SSH config options for this host:

Host git.companyname.com
RSAAuthentication yes
IdentitiesOnly yes
IdentityFile ~/.ssh/gitlab_rsa
User git

What other issues should I check for?

like image 655
isherwood Avatar asked Sep 26 '22 00:09

isherwood


1 Answers

My solution ended up being to use Git bash rather than the Windows terminal (or ConEmu in my case). Something is handled differently with respect to SSH keys between the two systems.

like image 89
isherwood Avatar answered Sep 30 '22 07:09

isherwood