[JIRA] (JENKINS-57565) server.key was unexpected at this time error while building Saleforce using DX

10 views
Skip to first unread message

manojparida4@gmail.com (JIRA)

unread,
May 20, 2019, 12:08:02 PM5/20/19
to jenkinsc...@googlegroups.com
Manoj P created an issue
 
Jenkins / Bug JENKINS-57565
server.key was unexpected at this time error while building Saleforce using DX
Issue Type: Bug Bug
Assignee: Owen Mehegan
Components: gitlab-plugin
Created: 2019-05-20 16:07
Environment: Local
Priority: Critical Critical
Reporter: Manoj P

Hi,

 

While building a Salesforce App using multibranch pipeline, I am getting below error. All configs are correct. Git connection successful. Secret file created and id added to path. Could anyone help whats the issue? Using jenkins-2.164.3 - the latest version

 

 

C:\Program Files (x86)\Jenkins\workspace\sfdx_>"C:\Program Files\Salesforce CLI\bin\sfdx" force:auth:jwt:grant --instanceurl https://test.salesforce.com --clientid 3MVG91LYYD8O4krRCwFq8CKUq8aUBCOGyPmIM919iQ8.rJw2w.JLmTNmuk_heggv79**** --jwtkeyfile **** --username ************ --setalias UAT \Jenkins\workspace\sfdx_@tmp\secretFiles\f28291d9-e13f-4537-9ef8-b47ea745880c{color:#FF0000}server.key was unexpected at this time.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

owen@nerdnetworks.org (JIRA)

unread,
May 20, 2019, 8:51:03 PM5/20/19
to jenkinsc...@googlegroups.com

owen@nerdnetworks.org (JIRA)

unread,
May 20, 2019, 8:51:03 PM5/20/19
to jenkinsc...@googlegroups.com
Owen Mehegan updated an issue
Change By: Owen Mehegan
Component/s: core
Component/s: gitlab-plugin

yevhenii.riabinin@gmail.com (JIRA)

unread,
Oct 8, 2019, 9:36:07 AM10/8/19
to jenkinsc...@googlegroups.com
Yevhenii Riabinin commented on Bug JENKINS-57565
 
Re: server.key was unexpected at this time error while building Saleforce using DX

Hi, try to wrap --jwtkeyfile value with double quotes:   

--jwtkeyfile \"${KEY_VARIABLE}\"

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

nicky.torstensson@gmail.com (JIRA)

unread,
Jan 31, 2020, 11:13:03 AM1/31/20
to jenkinsc...@googlegroups.com

I have an identical issue. In addition to the bug description and the comment by Manoj P:

  • I am using Jenkins v2.219
  • I am using Custom Tools plugin v0.7 in Jenkins to install sfdx (see link #1 below), such that I can use Jenkins in the Build section to Execute Windows batch commands (see link #2 below).

 

I am able to authorize into Salesforce via the connected app from command prompt with client id (consumer key), username and secret file, as described in this video (see link #4 below, visual guide of link #3).

 

I tried Yevhenii Riabinin's suggestion on escaping the secret file with quotes (\"). It didn't work, and a different error was thrown: The flag value ""C:\Program" is not in the correct format for "filepath."

 

If it is relevant, I have been following the below guides:

  1. https://medium.com/@r.kurchenko/install-salesforcedx-cli-for-jenkins-builds-2e89495cc80b
  2. https://medium.com/@karthick.shanmugam0689/continous-differential-deployment-with-salesforce-dx-and-jenkins-24ab3192163f
  3. http://amitsalesforce.blogspot.com/2019/01/continuous-integration-using-jenkins-with-salesforceDx.html
  4. https://youtu.be/IvTlx6lBkQY?t=755 - see from 12:02.

nicky.torstensson@gmail.com (JIRA)

unread,
Jan 31, 2020, 11:14:03 AM1/31/20
to jenkinsc...@googlegroups.com
Nicky Torstensson edited a comment on Bug JENKINS-57565
I have an identical issue. In addition to the bug description and the comment by Manoj P
:
* I am using Jenkins v2.219
* I am using Custom Tools plugin v0.7 in Jenkins to install sfdx (see link #1 below), such that I can use Jenkins in the Build section to Execute Windows batch commands (see link #2 below).


 

I am able to authorize into Salesforce via the connected app from command prompt with client id (consumer key), username and secret file, as described in this video (see link #4 below, visual guide of link #3).

 

I tried Yevhenii Riabinin's suggestion on escaping the secret file with quotes (\"). It didn't work, and a different error was thrown: _The flag value ""C:\Program" is not in the correct format for "filepath."_


 

If it is relevant, I have been following the below guides:

nicky.torstensson@gmail.com (JIRA)

unread,
Jan 31, 2020, 11:32:03 AM1/31/20
to jenkinsc...@googlegroups.com
Nicky Torstensson edited a comment on Bug JENKINS-57565
I have an identical issue. In addition to the bug description:

* I am using Jenkins v2.219
* I am using Custom Tools plugin v0.7 in Jenkins to install sfdx (see link #1 below), such that I can use Jenkins in the Build section to Execute Windows batch commands (see link #2 below).

 

I am able to authorize into Salesforce via the connected app from command prompt with client id (consumer key), username and secret file, as described in this video (see link #4 below, visual guide of link #3).

*Workaround* is in the script line to reference the file directly on your computer.

 

I tried Yevhenii Riabinin's suggestion on escaping the secret file with quotes (\"). It didn't work, and a different error was thrown: _The flag value ""C:\Program" is not in the correct format for "filepath."_

 

If it is relevant, I have been following the below guides:
# [https://medium.com/@r.kurchenko/install-salesforcedx-cli-for-jenkins-builds-2e89495cc80b]
# [https://medium.com/@karthick.shanmugam0689/continous-differential-deployment-with-salesforce-dx-and-jenkins-24ab3192163f]
# [http://amitsalesforce.blogspot.com/2019/01/continuous-integration-using-jenkins-with-salesforceDx.html]
# [https://youtu.be/IvTlx6lBkQY?t=755|https://youtu.be/IvTlx6lBkQY?t=719] - see from 12:02.
Reply all
Reply to author
Forward
0 new messages