Git Product home page Git Product logo

Comments (4)

kazzkiq avatar kazzkiq commented on August 15, 2024

On the Password issue:
It seems Node support CLI prompt writing with .stdin() function. E.g.

const exec = require('child_process').exec;

let cmd = exec('git command here etc', (error, stdout, stderr) => {
    // ...
});

// When a prompt appears, write "Yes" (could be the password)
cmd.stdin.write("yes");

More info here.

from caravel.

felipeuntill avatar felipeuntill commented on August 15, 2024

I good approach to solve both problems is use the github access token for command line

Can i implement it?

from caravel.

kazzkiq avatar kazzkiq commented on August 15, 2024

@felipeuntill Actually I think an universal approach would be better, since users can then be able to use other Git services too (Gitlab, Bitbucket, Assembla, Beanstalk, etc).

I think the best approach would be dropping password support (this approach requires Git password on the caravel.json file, which is dangerous and not secure practice) and using SSH login instead.

The SSH don't need to be configured by Caravel, but we can still add a tutorial on the future documentation/website so users know how to do it on their systems.

This answer explains about how to configure Git SSH authentication:
http://stackoverflow.com/a/11251797/694105

Theoretically those are the needed steps:

  1. User register SSH key for their repo (on their machine);
  2. User install and run Caravel;
  3. Caravel emit Git commands, which automatically use the registered SSH from the system;
  4. Everything works without need for passwords.

The problem is, this is theory. I haven't tested this approach yet. But as most Git services have tutorials on how to enable SSH for repos, I believe it will work as expected.


tl;dr:
We should drop password support and accept only SSH-based access for private repos (which need to be done in the system by the user, not by Caravel).

So, the next step now would be removing password support on Caravel and testing SSH keys instead.

More information about this approach here:
https://help.github.com/articles/generating-an-ssh-key/
http://docs.gitlab.com/ce/ssh/README.html
https://git-scm.com/book/pt-br/v1/Git-no-Servidor-Gerando-Sua-Chave-P%C3%BAblica-SSH

from caravel.

kazzkiq avatar kazzkiq commented on August 15, 2024

Just tested with a private project, and after adding SSH keys it work flawlessly. Will be closing this one.

from caravel.

Related Issues (7)

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.