相关疑难解决方法(0)

安装Jenkins后不能su给用户jenkins

我已经安装了jenkins,我正试图进入一个shell作为Jenkins来添加一个ssh密钥.我似乎无法进入jenkins用户:

[root@pacmandev /]# sudo su jenkins
[root@pacmandev /]# whoami
root
[root@pacmandev /]# echo $USER
root
[root@pacmandev /]# 
Run Code Online (Sandbox Code Playgroud)

jenkins用户存在于我的/ etc/passwd文件中.Runnin su jenkins要求输入密码,但拒绝我的普通密码.sudo su jenkins好像什么也没做; 同样的sudo su - jenkins.我在CentOS上.

unix linux jenkins

86
推荐指数
2
解决办法
8万
查看次数

Jenkins Git插件:无法连接到存储库,返回状态码128

我正在尝试克隆一个远程GitHub企业存储库,并在我的Jenkins配置中将我的远程repo的URL添加到Git插件后遇到以下错误:

hudson.plugins.git.GitException: Command "/usr/bin/git -c askpass=true fetch --tags --progress https://github.com/myUsername/myProject.git  refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: fatal: unable to access https://github.myOrg.com/myUsername/myProject.git/': Failed to connect to github.com port 443: Operation timed out    at... 
Run Code Online (Sandbox Code Playgroud)

配置细节和我尝试过的事情:

  • Jenkins URL默认为http:// localhost:8080 / (获取警告:"请设置有效的主机名,而不是localhost")
  • 列出的所有依赖项都已安装用于Git插件
  • 我已将git凭据添加到我组织的远程仓库中进行授权
  • 我尝试将我的个人(非企业git帐户)凭据和repo添加到插件中,结果相同
  • 我已将"Git可执行文件路径"设置为'git'和'/ usr/bin/git'
  • 我可以通过命令行和浏览器连接到Git

问题:

  • 我不知何故应该提供身份验证(ssh密钥)只是为了詹金斯使用/克隆我的远程仓库?
  • 为什么Jenkins会抛出保留默认URL的警告?这是否意味着我需要将詹金斯放在除本地机器以外的地方?

我已经对此进行了几天的故障排除,目前还不确定我的问题是什么!请帮忙!!

git jenkins github-enterprise

9
推荐指数
1
解决办法
6万
查看次数

在 git jenkins 中找不到存储库

在此处输入图片说明

我正在使用安装了最新插件的 jenkins 2.64。

我正在尝试在 jenkins 中设置 git repo 并提供凭据,但给出错误无法连接状态代码为 128 的存储库。

Cloning repository https://github.com/somerepository.git
 > git init /Users/kumar/.jenkins/workspace/sample # timeout=10
Fetching upstream changes from https://github.com/somerepository.git
 > git --version # timeout=10
using GIT_ASKPASS to set credentials 
 > git fetch --tags --progress https://github.com/somerepository.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --tags --progress https://github.com/somerepository.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: remote: Repository not found.
fatal: repository 'https://github.com/somerepository.git/' not found

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1622)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
    at …
Run Code Online (Sandbox Code Playgroud)

git macos jenkins

7
推荐指数
1
解决办法
9685
查看次数

标签 统计

jenkins ×3

git ×2

github-enterprise ×1

linux ×1

macos ×1

unix ×1