我无法Secret text在Jenkins的项目SCM部分的下拉列表中看到任何凭据.我知道Secret text从SCM部分的下拉部分创建凭证已被破坏,但即使我通过导航创建凭证Jenkins -> Credentials,该凭据也不会出现在下拉列表中.
我创建了每种类型的凭证,我在下拉列表中看到的唯一类型是Username with password.看起来SCM中的下拉过滤掉了不属于这种类型的每个凭证.
我需要Secret textSCM部分凭据的原因是因为我想使用Github访问令牌(而不是我的Github帐户用户名和密码).
以下屏幕截图显示了我的Secret text凭据明确存在的全局凭据.

以下屏幕截图显示了我的项目的SCM部分的Git下拉列表,其中仅Username and password存在凭证.
Jenkins版本:2.102
Jenkins Credentials插件版本:2.1.16
Jenkins Git插件版本:3.7.0
我正在尝试使用AWS的Java配置(而不是他们的Tomcat配置)在AWS Elastic Beanstalk上部署一个非常简单的Spring Boot应用程序,但是我在以下日志中遇到了502错误:
2016/06/10 02:00:14 [error] 4921#0: *1 connect() failed
(111: Connection refused) while connecting to upstream, client: 38.94.153.178,
server: , request: "GET /test HTTP/1.1", upstream: "http://127.0.0.1:5000/test",
host: "my-single-instance-java-app.us-east-1.elasticbeanstalk.com"
Run Code Online (Sandbox Code Playgroud)
我已经尝试通过Spring的application.properties将我的端口设置为日志似乎想要的内容(5000,使用server.port=5000)并验证我的应用程序在localhost上的该端口上成功运行.
这个问题非常相似,只是我正在部署JAR而不是WAR.看起来我在配置Nginx方面缺少一些东西,我不知道如何继续.
这是我的Spring应用程序:
@SpringBootApplication
public class MyApplication {
public static void main(String[] args) {
SpringApplication.run(MyApplication.class, args);
}
@RestController
public static class MainController {
@RequestMapping("/test")
public String testMethod() {
return "Method success!";
}
}
}
Run Code Online (Sandbox Code Playgroud) port nginx amazon-web-services spring-boot amazon-elastic-beanstalk
我在 iOS 应用程序中使用 Moya 和 RxSwift 进行网络连接,我希望能够在我的Observers 调用onError.
API 始终以以下 JSON 格式返回错误响应:
{
"error": {
"message": "Error message goes here",
"code": "String error code"
}
}
Run Code Online (Sandbox Code Playgroud)
目标是实现类似于以下代码片段的内容,其中传入的错误onError是我的自定义错误类型而不是Moya.Error类型:
observable
.subscribe(
onNext: { response in
// Do typical onNext stuff
},
onError: { error in
// Get and consume my custom error type here:
let customError = error as! MyCustomErrorModel
print("My API's error message: \(customError.error?.message)")
print("My API's error code: \(customError.error?.code)")
})
Run Code Online (Sandbox Code Playgroud)
我能够使用自定义PluginType(粘贴在下面,来自 …
git ×1
ios ×1
jenkins ×1
moya ×1
nginx ×1
objectmapper ×1
port ×1
rx-swift ×1
spring-boot ×1
swift ×1