Git Product home page Git Product logo

Comments (8)

czechboy0 avatar czechboy0 commented on June 2, 2024

Great point, I completely forgot about this feature. It will require me looking into how to pass it in the Xcode Server API, but will be easy to add in the UI.

Also, this uncovered another issue - the validation only checks the GitHub token, not the SSH keys. Do you know an easy way to verify SSH key access to a repo without checking it out?

from buildasaur.

joelekstrom avatar joelekstrom commented on June 2, 2024

Check out git ls-remote, it will fail if there is no permission to access the repo. Not sure about how to supply it the SSH-keys though. I'll get back to you if I think of something!

from buildasaur.

czechboy0 avatar czechboy0 commented on June 2, 2024

Thanks, this is useful!

from buildasaur.

joelekstrom avatar joelekstrom commented on June 2, 2024

Check out the top answer here http://stackoverflow.com/questions/4565700/specify-private-ssh-key-to-use-when-executing-shell-command-with-or-without-ruby.

I think it will solve your problem. It will invoke the SSH agent, add the keys temporary, and then you can execute git ls-remote from the SSH agent context. That way you should be able to verify the credentials without permanently changing the users SSH agent.

from buildasaur.

czechboy0 avatar czechboy0 commented on June 2, 2024

@accatyyc I tried the solution from stackoverflow, unfortunately that doesn't seem to force the use of the specify the use of those SSH keys, instead it seems to add that key. So if on your machine, where you already have access to a repo and you specify different keys for Builda, I can't verify that those new keys are wrong. I'll keep looking.

from buildasaur.

czechboy0 avatar czechboy0 commented on June 2, 2024

So I started looking into passphrase support, and I can't seem to find a way to provide the passphrase on the command line for ssh when validating the keys. Seems to require some tool called sshpass, but I can't require people to install this. That means that the first time when trying to validate (when saving the settings), a popup asking for the SSH passphrase would pop up (not terrible but annoying, if we want to add the passphrase as another field in the setup). Any ideas?

from buildasaur.

czechboy0 avatar czechboy0 commented on June 2, 2024

Actually, I found a much simpler way, which will make yesterday's work unnecessary (the git 2.3 hacking). I already had a hunch in #25, I'm using a hidden Xcode Server tool called xcsbridge which has blueprint validation (blueprints contain git credentials and verify they are correct). Making the changes now.

from buildasaur.

czechboy0 avatar czechboy0 commented on June 2, 2024

@accatyyc Okay, this is fixed. In the UI now you should see a textfield to put the SSH passphrase. Thanks for reporting this!

from buildasaur.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.