ssh with bitbucket and proof builds

To share knowledge, suggest new features, report bugs, or ask for helps.

ssh with bitbucket and proof builds

Postby richard » Wed Jan 11, 2017 8:21 pm

Code: Select all
2017-01-11 19:38:42,660 [pool-1-thread-11] INFO  com.pmease.quickbuild.CheckConditionJob - Taking repository snapshots...
2017-01-11 19:38:42,715 [pool-1-thread-11] INFO  com.pmease.quickbuild.repositorysupport.Repository - Taking snapshot of repository 'dev'...
2017-01-11 19:38:42,716 [pool-1-thread-11] INFO  com.pmease.quickbuild.repositorysupport.Repository - Determining head revision for repository: dev
2017-01-11 19:38:45,140 [pool-1-thread-11] INFO  com.pmease.quickbuild.repositorysupport.Repository - Taking snapshot of repository 'Foo dev'...
2017-01-11 19:38:45,140 [pool-1-thread-11] INFO  com.pmease.quickbuild.repositorysupport.Repository - Determining head revision for repository: Foo dev
2017-01-11 19:38:45,952 [pool-1-thread-13] ERROR com.pmease.quickbuild.execution.LineConsumer - Host key verification failed.
2017-01-11 19:38:46,033 [pool-1-thread-13] ERROR com.pmease.quickbuild.execution.LineConsumer - fatal: Could not read from remote repository.
2017-01-11 19:38:46,033 [pool-1-thread-13] ERROR com.pmease.quickbuild.execution.LineConsumer -
2017-01-11 19:38:46,034 [pool-1-thread-13] ERROR com.pmease.quickbuild.execution.LineConsumer - Please make sure you have the correct access rights
2017-01-11 19:38:46,034 [pool-1-thread-13] ERROR com.pmease.quickbuild.execution.LineConsumer - and the repository exists.
2017-01-11 19:38:46,106 [pool-1-thread-10] ERROR com.pmease.quickbuild.DefaultBuildEngine - Error processing build request.
    java.lang.RuntimeException: Error executing check condition job.
        at com.pmease.quickbuild.CheckConditionTask.reduce(CheckConditionTask.java:39)
        at com.pmease.quickbuild.CheckConditionTask.reduce(CheckConditionTask.java:16)
        at com.pmease.quickbuild.grid.GridTaskFuture.get(GridTaskFuture.java:116)
        at com.pmease.quickbuild.grid.GridTaskFuture.get(GridTaskFuture.java:120)
        at com.pmease.quickbuild.DefaultBuildEngine.process(DefaultBuildEngine.java:332)
        at com.pmease.quickbuild.DefaultBuildEngine.access$000(DefaultBuildEngine.java:139)
        at com.pmease.quickbuild.DefaultBuildEngine$2.run(DefaultBuildEngine.java:1144)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Caused by: com.pmease.quickbuild.QuickbuildException: Failed to run command: git clone --no-checkout ssh://git@bitbucket.org/foo/bar.git C:\quickbuild-6.1.36\workspace\root\bar-q
    Command return code: 128
    Command error output: Host key verification failed.
    fatal: Could not read from remote repository.
    Please make sure you have the correct access rights
    and the repository exists.
        at com.pmease.quickbuild.execution.Commandline$ExecuteResult.buildException(Commandline.java:491)
        at com.pmease.quickbuild.execution.Commandline$ExecuteResult.checkReturnCode(Commandline.java:506)
        at com.pmease.quickbuild.plugin.scm.helper.ScmCli.run(ScmCli.java:90)
        at com.pmease.quickbuild.plugin.scm.helper.ScmCli.run(ScmCli.java:79)
        at com.pmease.quickbuild.plugin.scm.helper.ScmCli.run(ScmCli.java:71)
        at com.pmease.quickbuild.plugin.scm.git.GitCli.create(GitCli.java:135)
        at com.pmease.quickbuild.plugin.scm.git.GitCli.doSync(GitCli.java:46)
        at com.pmease.quickbuild.plugin.scm.helper.ScmCli.sync(ScmCli.java:61)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository.getGit(GitRepository.java:406)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository.getHeadRevision(GitRepository.java:138)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository$$EnhancerByCGLIB$$c845be5e.CGLIB$getHeadRevision$20(<generated>)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository$$EnhancerByCGLIB$$c845be5e$$FastClassByCGLIB$$934a6584.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository$$EnhancerByCGLIB$$c845be5e.getHeadRevision(<generated>)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository.getHeadRevision(GitRepository.java:49)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository$$EnhancerByCGLIB$$c845be5e.CGLIB$getHeadRevision$21(<generated>)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository$$EnhancerByCGLIB$$c845be5e$$FastClassByCGLIB$$934a6584.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository$$EnhancerByCGLIB$$c845be5e.getHeadRevision(<generated>)
        at com.pmease.quickbuild.repositorysupport.Repository.takeSnapshot(Repository.java:342)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository$$EnhancerByCGLIB$$c845be5e.CGLIB$takeSnapshot$70(<generated>)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository$$EnhancerByCGLIB$$c845be5e$$FastClassByCGLIB$$934a6584.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository$$EnhancerByCGLIB$$c845be5e.takeSnapshot(<generated>)
        at com.pmease.quickbuild.setting.configuration.snapshot.TakeReferencedSnapshots.takeSnapshot(TakeReferencedSnapshots.java:15)
        at com.pmease.quickbuild.model.Configuration.takeSnapshot(Configuration.java:1774)
        at com.pmease.quickbuild.CheckConditionJob.execute(CheckConditionJob.java:35)
        at com.pmease.quickbuild.grid.GridJob.run(GridJob.java:106)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        ... 3 more


I've tried removing the known_hosts file from the ssh on the server, but I don't think that has anything to do with it. I am using the ssh installation that is bundled with the windows installer from git-scm.com.

Every test of the ssh configuration works in the git bash terminal but I get this error every time on quickbuild. Any ideas? I'm not familiar enough with mingw to know why quickbuild running the same commands fails when pasting them into the terminal succeeds (or what I would have to do to fix it).

Thanks.

also, the sucessful login from mingw terminal:

Code: Select all
$ ssh -T -v git@bitbucket.org
OpenSSH_7.3p1, OpenSSL 1.0.2j  26 Sep 2016
debug1: Reading configuration data /c/Users/Administrator/.ssh/config
debug1: /c/Users/Administrator/.ssh/config line 1: Applying options for bitbucket.org
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to bitbucket.org [104.192.143.3] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Administrator/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Administrator/.ssh/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.3
debug1: Remote protocol version 2.0, remote software version conker_1.0.268-723a194 app-131
debug1: no match: conker_1.0.268-723a194 app-131
debug1: Authenticating to bitbucket.org:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A
debug1: Host 'bitbucket.org' is known and matches the RSA host key.
debug1: Found key in /c/Users/Administrator/.ssh/known_hosts:1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /c/Users/Administrator/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([104.192.143.3]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
logged in as Foo.

You can use git or hg to connect to Bitbucket. Shell access is disabled.
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2696, received 1728 bytes, in 0.2 seconds
Bytes per second: sent 12032.5, received 7712.2
debug1: Exit status 0
richard
 
Posts: 2
Joined: Wed Jan 11, 2017 8:08 pm

Re: ssh with bitbucket and proof builds

Postby robinshen » Thu Jan 12, 2017 12:45 am

We do not suggest to use ming or cygwin git/hg binaries in QuickBuild. Please use the bare bone binaries installed to Windows separately. Then make sure you can clone the repository from a Windows command line prompt as the same user running QB process.
robinshen
Site Admin
 
Posts: 6134
Joined: Thu Jul 24, 2003 9:53 pm

Re: ssh with bitbucket and proof builds

Postby richard » Thu Jan 12, 2017 8:45 pm

It looks like it's fixed by changing the logon of the user agent from localsystem to my account. whoops.
richard
 
Posts: 2
Joined: Wed Jan 11, 2017 8:08 pm


Return to QuickBuild Support

Who is online

Users browsing this forum: No registered users and 4 guests

cron