相关疑难解决方法(0)

sh和bash之间的区别

在编写shell程序时,我们经常使用/bin/sh/bin/bash.我经常使用bash,但我不知道它们之间有什么区别.

bash和之间的主要区别是sh什么?

我们究竟需要意识到在编程时bashsh

unix bash shell sh

1194
推荐指数
11
解决办法
46万
查看次数

如何使用 Job DSL 配置 Jenkins GitHubPullRequestBuilder 插件

我正在私有 GitHub 存储库和 Jenkins 构建之间设置 webhook 集成。我专门使用 Job DSL groovy 脚本配置作业(我愿意切换到另一种编程作业配置机制,但我不会接受任何要求我手动配置作业的答案)。II 想设置一个提交状态上下文和一组基于构建状态的自定义消息。

Jenkins 中嵌入Job DSL API 文档没有帮助,只给了我这个签名:githubPullRequest(Closure closure),但没有告诉我如何构建合适的闭包。

以下是我的工作 DSL 的相关部分:

triggers {
    githubPush()
    githubPullRequest {
        useGitHubHooks()
        buildStatus {
            completedStatus('SUCCESS', 'Build succeeded!')
            completedStatus('FAILURE', 'Build failed. ')
            completedStatus('ERROR', 'Build errored. This is probably a problem with Jenkins or related infrastructure and not an issue with your code changes.')
        }
    }
}

(...)

scm {
    git {
        remote {
            github('privateorg/myrepo', 'ssh')
            credentials('my-credential-id')
            refspec('+refs/pull/*:refs/remotes/origin/pr/*')
        }
        branch('${sha1}')
    }
} …
Run Code Online (Sandbox Code Playgroud)

github jenkins jenkins-job-dsl

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

sftp密码验证时卷曲失败

当我使用用户名和密码手动sftp时,它工作正常,而使用curl时,它会失败。相同的脚本将成功连接到其他服务器,而不会出现问题。因为我可以手动登录,并且其他客户端没有问题,所以服务器管理员的帮助不大。

这是卷曲失败的尝试:

curl -v --insecure --user username:password sftp://someurl.com

*   Trying 199.187.***.***...
* Connected to someurl.com (199.187.***.***) port 22 (#0)
* SSH MD5 fingerprint: 6831eae63f230952a1775e0f67f80e7b
* SSH authentication methods available: publickey,gssapi-keyex,gssapi with-mic,password
* Using SSH public key file '(nil)'
* Using SSH private key file ''
* SSH public key authentication failed: Unable to extract public key from private key file: Unable to open private key file
* Failure connecting to agent
* Authentication failure
* Closing connection 0
curl: (67) …
Run Code Online (Sandbox Code Playgroud)

authentication passwords sftp curl

3
推荐指数
1
解决办法
7799
查看次数

标签 统计

authentication ×1

bash ×1

curl ×1

github ×1

jenkins ×1

jenkins-job-dsl ×1

passwords ×1

sftp ×1

sh ×1

shell ×1

unix ×1