Giter VIP home page Giter VIP logo

Comments (4)

 avatar commented on June 23, 2024

You'd have to run sudo first: cat ~/.ssh/id_rsa.pub | ssh sijk@server 'sudo gitreceive upload-key sijk'

I've created a PR to notate this in the README.

from gitreceive.

sijk avatar sijk commented on June 23, 2024

Hmm, I suspected as much. I'm trying to figure out how to let unprivileged users (non-sudoers) upload their own keys. Current musings:

  • Give the git user a trivial password
  • Set up (a modified version of) gitreceive as a kind of restricted shell
  • Upload via cat ... | ssh git:git@server 'upload-key sijk'
  • Somehow limit push/pull access to those authenticated via publickey so that you can't push using the trivial password.

I don't know if all that's possible, but I'll experiment with it when I get the time.

from gitreceive.

progrium avatar progrium commented on June 23, 2024

Giving git user a trivial password will probably kill the experience of pushing with git. I'm not sure what you mean by making it a restrictive shell or how that would help.

It's all just a permissions issue. You can create a non-root, non-git user that has access to write to the git user's authorized_keys file and give that user a trivial password. Or you can wrap some kind of automation (a web server maybe) around it that runs as a user with permission.

This is why I was hesitant about your pull request -- you don't need to be root to use gitreceive upload-key and now it implies you do.

from gitreceive.

 avatar commented on June 23, 2024

Hmm - true. Perhaps a note before we start diving into examples is needed. Something along the lines of "in this document sudo is used to escalate privileges as needed, but you may run the commands from any user that has access to ~git/.ssh/authorized_keys." I'll let you refine & place it somewhere that makes sense.

(On a side note: I didn't create this issue, just submitted a PR - you seemed to reference me when replying to @sijk)

from gitreceive.

Related Issues (19)

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.