我想通过Jenkins从git获取最新的代码.每次我这样做,我得到以下错误.我已经跟进了stackoverflow敌人的一些链接,但他们似乎都没有解决这个问题.
这是错误.
Checking out Revision bc304892eadfaaf7338fa6e5f370137555d7cfd9 (refs/remotes/origin/master)
> C:\Program Files\Git\bin\git.exe config core.sparsecheckout # timeout=10
> C:\Program Files\Git\bin\git.exe config core.sparsecheckout true # timeout=10
> C:\Program Files\Git\bin\git.exe read-tree -mu HEAD # timeout=10
Command "C:\Program Files\Git\bin\git.exe read-tree -mu HEAD" returned status code 128:
stdout:
stderr: fatal: Not a valid object name HEAD
> C:\Program Files\Git\bin\git.exe checkout -f bc304892eadfaaf7338fa6e5f370137555d7cfd9
FATAL: Could not checkout bc304892eadfaaf7338fa6e5f370137555d7cfd9
hudson.plugins.git.GitException: Could not checkout bc304892eadfaaf7338fa6e5f370137555d7cfd9
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1907)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
at hudson.remoting.UserRequest.perform(UserRequest.java:120)
at hudson.remoting.UserRequest.perform(UserRequest.java:48) …Run Code Online (Sandbox Code Playgroud) 我正在尝试以这种格式获取 moment js 中的日期时间:
2016-12-19T09:43:45.672Z
Run Code Online (Sandbox Code Playgroud)
问题是我能够得到时间格式
2016-12-19T15:04:09+05:30
Run Code Online (Sandbox Code Playgroud)
使用
moment().format();
Run Code Online (Sandbox Code Playgroud)
但我需要第一个格式[例如 .672Z 而不是 +05:30]。任何建议都会有很大帮助。