无法将 jenkins 连接到远程 git 存储库



我正在尝试将我的 jenkins 连接到远程 git 存储库,例如aa-bb-server

在凭据配置中,我输入了用户名和私钥,这就是我得到的:

Failed to connect to repository : Command "git ls-remote -h aa-bb-server HEAD" returned status code 128:
stderr: fatal: 'aa-bb-server' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

将 Jenkins 用户更改为root不起作用。

在本地,我可以 ssh 到存储库、克隆等。

嗨,请按照以下步骤操作 如果你在服务器中安装了 Jenkins,请初始化 git 空存储库 -->git init

然后转到 github -->单击配置文件下拉列表 -->设置 --> 开发人员设置 -->个人访问令牌 -->生成新令牌 -->选择所有范围-->复制令牌

然后转到 Jenkins -->管理 Jenkins-->github 设置-->添加用户-->选择机密文本 ** --> **粘贴令牌

并测试您的 git 中心访问权限 之后转到项目并添加您的存储库 URL(以 .git 结尾(

最新更新