最近在开发成都某食品供应链平台软件时,因为是有vue前后端做的pc端的软件开发,用uniapp做的小程序开发和app开发,因为并发量和复杂性,我们选择使用的laravel框架,及用lumen做的微服务实现,同事执行composer install报错,但是用小乌龟能正常,其他同事也能正常。且此同时,确定是有访问仓库的权限,具体报错如下
composer install Loading composer repositories with package information [RuntimeException] Failed to execute git clone --mirror "git@121.XX.33.228:root/xxSdk.git" "C:/Users/liy/AppData/Local/Composer/vcs/git-121.xx.33.228-root-xxSdk.git/" Cloning into bare repository 'C:/Users/liy/AppData/Local/Composer/vcs/git-121.40.xx.228-root-xxSdk.git'... Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
其实这个问题,很好解决,因为同事的电脑上的git默认的配置,没有加到git平台上,小乌龟是用的独立的一套。具体可以用如下的git命令去验证是否用户名正常
PS D:\devww> git config user.username PS D:\devww> git config user.useremail PS D:\devww> git status On branch master Your branch is up to date with 'origin/master'. Changes not staged for commit: (use "git add/rm <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) deleted: composer.lock Untracked files: (use "git add <file>..." to include in what will be committed) .htaccess nginx.htaccess no changes added to commit (use "git add" and/or "git commit -a")
重新安装后,执行正常结果如下
PS D:\devww> composer install Loading composer repositories with package information Updating dependencies (including require-dev)
文章来源:久思微定制软件开发PHP部门