Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yarn not install git private repositories

Tags:

git

yarnpkg

I am using yarn but it is giving an below error for private git repositories. npm installed this repo successfully.

yarn install v1.2.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads ssh://[email protected]/test/testconfigs.git
Directory: /Users/admin/Projects/Demo/myProject
Output:
Permission denied (publickey).
fatal: Could not read from remote repository.
like image 408
sunny gaikwad Avatar asked Nov 08 '22 15:11

sunny gaikwad


1 Answers

This works for me:

Add the GitHub key to the list of authorized hosts:

ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts

Original answer:

Git error: "Host Key Verification Failed" when connecting to remote repository

like image 122
Rishabh Mehrotra Avatar answered Nov 15 '22 06:11

Rishabh Mehrotra