在没有 Tomcat 的情况下运行 Jenkins,尝试 SSH

发布于 2025-01-08 20:29:45 字数 527 浏览 6 评论 0原文

我没有通过 tomcat 运行 jenkins;相反,我将其运行为...我真的不知道。我通过 yum 安装了它,然后运行它。

我支付了大约 50 个小型 Java 应用程序的开发费用,一次最多构建三个。

我一直在使用 GitHub 来让所有开发人员保持联系,而且效果非常好。直到现在,我才将一些存储库设为私有 - Jenkins 无法再访问它们。 我尝试给它 SSH 密钥;我通过使用“ssh-keygen”作为 root 来完成此操作,并使用“ssh -T [email  ;protected]”,然后将所有文件(公共、私有和已知主机)复制到/var/lib/jenkins/.ssh。

我认为这足以允许 Jenkins 访问我的组织的私人存储库(我拥有它,并且我将公钥添加到我的 GitHub 帐户) - 但这似乎还不够。

我到底哪里出错了?

I am not running jenkins through tomcat; I am instead running it as... I don't really know. I installed it through yum, and I run it.

I pay for the development of around fifty small java applications, with at most three being built at a time.

I've been using GitHub to keep all my developers in touch with eachother, and it has been working great. Only now, I've made some repos private - and Jenkins can no longer access them.
I have attempted to give it SSH keys; I did this by using "ssh-keygen" as root, authenticated with "ssh -T [email protected]", and then copied all files (Public, private, and known hosts) to /var/lib/jenkins/.ssh.

I thought this would be enough to allow Jenkins access to my organizations private repos (I own it, and I added the public key to my GitHub account) - but that does not seem to be sufficient.

Where was it I went wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疾风者 2025-01-15 20:29:45

问题是我没有正确给予 Jenkins SSH 身份验证。

我必须编辑 /etc/passwd,并为其提供 shell 访问权限(将 /false 更改为 /bash),

& su jenkins

ssh-keygen

打开新的 .pub 文件,将其粘贴到 github 中,然后一切顺利。

The issue was that I was not properly giving Jenkins SSH authentication.

I had to edit /etc/passwd, and give it shell access (Changing /false to /bash),

& su jenkins

ssh-keygen

Open up the new .pub file, paste that into github, and then all was well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文