【发布时间】:2019-12-11 20:46:20
【问题描述】:
我有一个 jenkins,我使用 jenkins 配置克隆了一个 repo。 然后在那个仓库中我有一个克隆另一个仓库的ansible任务:
- name: Mock Server
vars:
mock_server: "{{ base_build_path }}/uds-mock-server"
git:
repo: 'git@github.ibm.com:xxxxx/mock-server.git'
dest: "{{ mock_server }}"
clone: yes
recursive: yes
version: master
track_submodules: yes
现在的问题是因为在 jenkins 中运行的代码无法访问我得到的 repo:
"Permission denied (publickey).", "fatal: Could not read from remote repository.", "", "Please make sure you have the correct access rights", "and the repository exists."], "stdout": "", "stdout_lines": []}
那么无论如何我可以在配置中的 jenkins 中添加私钥,然后它会在克隆 repo 时使用该密钥?
【问题讨论】: