Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error bumping version: private keys with passphrases are not supported #115

Open
CalamarBicefalo opened this issue Jul 16, 2020 · 4 comments

Comments

@CalamarBicefalo
Copy link

CalamarBicefalo commented Jul 16, 2020

I have a pair of credentials that are not passphrase protected. The key has read/write access in GitHub.

For the current pipeline:

jobs:
  - name: test-and-build
    plan:
      - get: a-service
        trigger: true
      - put: version
        params:
          pre: SNAPSHOT

and the following resources:

resources:
  - name: a-service
    type: git
    source:
      uri: [email protected]:org/a-service.git
      branch: master
      private_key: ((a-service-deploy-key))

  - name: version
    type: semver
    source:
      initial_version: "0.0.0"
      driver: git
      uri: [email protected]:org/versions.git
      private_key: ((versions-deploy-key))
      branch: master
      file: a-service

I get the error:
error bumping version: private keys with passphrases are not supported

I saw a similar report in the git resource and followed advice there... The interesting thing is that if I use the version repo as input for the git resource, the git resource is capable of fetching the latest version commit (and then the version resource complains even though it is using the very same key/url), which proves:

  • The key is correct and works
  • The key is properly interpolated
  • Other git backed concourse resources seem happy with that

Any thoughts?

@CalamarBicefalo
Copy link
Author

CalamarBicefalo commented Jul 16, 2020

I found the problem... but it may be something nice to address in the resource.

It was indeed a key finishing without the new blank line. The bad news is that we use AWS secret manager and it seems to strip blank lines no matter what...

Adding any arbitrary new line would make it work but it is not a scalable solution, and other concourse resources seem to tolerate this, so at a very least there's an inconsistent approach that would be nice to address.

@CalamarBicefalo
Copy link
Author

For anyone interested, a cleaner workaround in case you cannot add a blank line to the key (that was our case) would be:

  - name: version
    type: semver
    source:
      initial_version: "0.0.0"
      driver: git
      uri: [email protected]:org/versions.git
      private_key: |
         ((versions-deploy-key))
      branch: master
      file: a-service

@Drupi
Copy link

Drupi commented Jul 20, 2020

Yep ! Works ! Thank you very much :)

@RealOrko
Copy link

This issue was identified here: #79

What I find interesting is that sombody proposed a possible code change for a PR. 🤔

arnikaeva pushed a commit to boclips/boclips-player that referenced this issue Sep 23, 2021
kieron-dev pushed a commit to cloudfoundry/eirini-ci that referenced this issue Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants