mlo*_*mis 5 windows git shell cygwin jenkins
我需要运行一个 bash 脚本来定期删除旧的 git 分支。我无法找到通过执行 shell 选项连接到 git 存储库的方法。
目前我正在使用 cygwin 来运行 git 命令。这是我在执行 shell 中的内容:
#!c:\cygwin64\bin\bash --login
git ls-remote git@10.1.1.126:/external-web/collette-com.git
Run Code Online (Sandbox Code Playgroud)
该命令引发以下错误。
[Delete Branches] $ c:\cygwin64\bin\bash --login
C:\Users\tbraga\AppData\Local\Temp\hudson5750784484659728632.sh
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Build step 'Execute shell' marked build as failure
Run Code Online (Sandbox Code Playgroud)
我尝试在命令行中运行此命令,并提示输入密码。这可能是问题所在吗?
我在 Jenkins 中配置了 git 插件,并且在使用源代码管理 Git 时连接工作正常。
任何有关如何使此连接在执行 shell 字段中工作的建议将不胜感激。
创建与您的用户关联的 SSH 密钥非常简单。
在这里试试:https ://confluence.atlassian.com/bitbucketserver/creating-ssh-keys-776639788.html
将密钥放在 %userprofile%/.ssh 下并尝试再次运行它。
您还可以使用 Jenkins 配置中使用的相同凭据
| 归档时间: |
|
| 查看次数: |
20104 次 |
| 最近记录: |