使用gitlab不是直接配置用户密码即可吗?白天还可用,晚上不管怎样都不能用了

    yuswift

    Started by user project-regular
    Started by user project-regular
    Started by user project-regular
    Started by user project-regular
    [Wed Nov 25 05:02:20 UTC 2020] Starting branch indexing...
     > git --version # timeout=10
    using GIT_ASKPASS to set credentials 
     > git ls-remote --symref git@10.0.1.185:ssss/BladeX.git # timeout=10
    ERROR: [Wed Nov 25 05:02:20 UTC 2020] Could not update folder level actions from source 
    hudson.plugins.git.GitException: Command "git ls-remote --symref git@10.0.1.185:ssss/BladeX.git" returned status code 128:
    stdout: 
    stderr: Permission denied, please try again.
    Permission denied, please try again.
    Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1761)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1666)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1657)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteSymbolicReferences(CliGitAPIImpl.java:2919)
    	at jenkins.plugins.git.AbstractGitSCMSource.retrieveActions(AbstractGitSCMSource.java:1093)
    	at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:848)
    	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:591)
    	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
    	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:164)
    	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1025)
    	at hudson.model.ResourceController.execute(ResourceController.java:97)
    	at hudson.model.Executor.run(Executor.java:429)
    [Wed Nov 25 05:02:20 UTC 2020] Finished branch indexing. Indexing took 0.21 sec
    FATAL: Failed to recompute children of devpfckn » auth
    hudson.plugins.git.GitException: Command "git ls-remote --symref git@10.0.1.185:ssss/BladeX.git" returned status code 128:
    stdout: 
    stderr: Permission denied, please try again.
    Permission denied, please try again.
    Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1761)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1666)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1657)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteSymbolicReferences(CliGitAPIImpl.java:2919)
    	at jenkins.plugins.git.AbstractGitSCMSource.retrieveActions(AbstractGitSCMSource.java:1093)
    	at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:848)
    	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:591)
    	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
    	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:164)
    	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1025)
    	at hudson.model.ResourceController.execute(ResourceController.java:97)
    	at hudson.model.Executor.run(Executor.java:429)
    Finished: FAILURE

    在自己的办公本子上做个公钥和私钥,公钥放到自己的gitlab账号里,私钥给配给ks凭证好给jenkins拿着用。应该是这个意思吧
    Rick

    freemankevin 更改标题为「已解决:devops流水线-凭证无法正常使用

    原因有好几种:
    一开始测试的时候,看到jenkins的流水线异常就顺手删除了,发现ks面板这边没法即使更新同步,会有报错,应该是不能再jenkins那边删流水线。暂时ks也没对jenkins做这块的权限控制。
    第二是和gitlab一样,要做密钥,使用ssh方式拉取git代码的话

    解决办法:
    1)暂时还未完全清楚这里的逻辑就暂时在ks面板那边删流水线
    2)git问题要做密钥才能让jenkins拿着用

    4 年 后
    freemankevin 更改标题为「devops流水线-凭证无法正常使用