question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deployment key mapping: Key comments not written for some key types/formats?

See original GitHub issue

I tried this action and in the output for the adding ssh-agent step, I see the following message for each key i added:

Comment for key 'ssh-rsa blablamykey= (stdin)' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.

My comments are in the format git@github.com:Myorg/myrepo.git. I tried it with and without quotes.

Why doesn’t it work?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mpdudecommented, Aug 30, 2021

@cosminionut1996 it worked, see the second last line. (There must be a glitch causing the last line, ignore it.)

0reactions
dmoored4commented, Jun 29, 2022

Thanks for all the work on this! New to GitHubCI but I think my CI failing is related to this. I’m using ed22519 keys and for one repo which is referencing one other private repo it works. When I have a repo that has to access 2+ repos it fails. I saw the ReadMe about adding comments to the keys to direct which url that key should be used for. Here’s the overall setup for where the CI is failing for the third repo.

GitHub Enterprise (git@github.com:my-enterprise)

Private Repos

FirstRepo (git@github.com:my-enterprise/FirstRepo.git)

  • Deploy Key: FirstRepo_Pub

SecondRepo (git@github.com:my-enterprise/SecondRepo.git)

  • Deploy Key: SeoncdRepo_Pub

ThirdRepo (git@github.com:my-enterprise/ThirdRepo.git)

  • Secrets/Actions/Repository Secrets:
    • FirstRepo_Priv:

      -----BEGIN OPENSSH PRIVATE KEY-----
      <redacted>= git@github.com:my-enterprise/FirstRepo.git
      -----END OPENSSH PRIVATE KEY-----
      
    • SecondRepo_Priv

      -----BEGIN OPENSSH PRIVATE KEY-----
      <redacted>= git@github.com:my-enterprise/SecondRepo.git
      -----END OPENSSH PRIVATE KEY-----
      

in my CI.yml

- uses: webfactory/ssh-agent@v0.5.4
   with:
       ssh-private-key: |
                  ${{ secrets.FirstRepo_Priv}}
                  ${{ secrets.SecondRepo_Priv}}

Is the issue with how I’ve set up the keys or how I’ve added the comments to my private keys? If I run ssh-keygen -t ed22519 -C " git@github.com:my-enterprise/FirstRepo.git" the URL is only added to the public key. From reading other posts it seemed that the url hint would just be able to be added as a plaintext comment to the end of the SSH key. Is this wrong in general or just not working for ed25519 or something else altogether? Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploy keys - GitLab Documentation
When a read-write deploy key is used to push a commit, GitLab checks if the creator of the deploy key has permission to...
Read more >
Load key home runner ssh invalid format
Invalid key format. I'm sure the key is correct: I use it personally to connect to the server. My config. The text was...
Read more >
Architecting the ArcGIS System: Best Practices - Esri
ArcGIS is a system that connects maps, apps, data, and people in ways that help ... configurable COTS apps that support key workflows...
Read more >
Jenkins use credentials in pipeline - Caritas Castellaneta
Copy previously created key to the application server This is an example of a ... configuring and writing scripts is not so easy...
Read more >
Segment Architecture Guidance
The value of these Federal and non-Federal capabilities and the reliance that public ... Illustrate the key players and compliance initiatives involved in ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found