gpt4 book ai didi

git - docker alpine 9 构建期间的 "Host key verification failed"

转载 作者:行者123 更新时间:2023-12-02 20:47:42 25 4
gpt4 key购买 nike

我正在尝试克隆一个私有(private) git repo 并遇到此错误:

npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

看来我需要将 git 主机添加到 known_hosts文件。但是,来自 Docker 的这个版本的 alpine 没有 ~/.ssh/known_host文件。
/etc/ssh/存在。

最佳答案

使用 https不需要设置 SSH key ,也不会要求输入密码:

git clone https://github.com/<username>/<repo name>.git

关于git - docker alpine 9 构建期间的 "Host key verification failed",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48875412/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com