我正在尝试使用BitBucket GIT存储库设置Jenkins,但Jenkins控制台总是给我这个错误代码:
Started by user Dakado
Building in workspace /var/lib/jenkins/workspace/TEST852
Fetching changes from the remote Git repository
Fetching upstream changes from git://bitbucket.org/GameTeamCZ/gtplaytime.git
FATAL: Failed to fetch from git://bitbucket.org/GameTeamCZ/gtplaytime.git
hudson.plugins.git.GitException: Failed to fetch from git://bitbucket.org/GameTeamCZ/ gtplaytime.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:625)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:847)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:872)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1411)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:651)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:560)
at hudson.model.Run.execute(Run.java:1670)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress git:// bitbucket.org/GameTeamCZ/gtplaytime.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: bitbucket.org[0: 131.103.20.167]: errno=Connection timed out
bitbucket.org[0: …Run Code Online (Sandbox Code Playgroud) 我有字符串"1000:2000,3000",我需要将它分成3个字符串,所以像这样:
"1000"
"2000"
"3000"
Run Code Online (Sandbox Code Playgroud)
我的代码看起来像:
int datas = 0;
String item = "";
String data = "";
String pocet = "";
List<String> items = "1000:2000,3000";
for (int ii = 0; ii < items.size(); ii++) {
System.out.println(items.get(ii));
int delkaid = items.get(ii).indexOf(":");
int delkadat = items.get(ii).indexOf(",") - items.get(ii).indexOf(":");
int delkapoctu = items.get(ii).length() - items.get(ii).indexOf(",");
for (int ite = 0; ite < delkaid; i++) {
item = item + items.get(ii).charAt(ite) + "";
}
for (int ite = 0; ite < delkadat; …Run Code Online (Sandbox Code Playgroud)