Giter Site home page Giter Site logo

lambda-git's People

Contributors

eredi93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lambda-git's Issues

Feature Request: Ability to pass credentials

Right now the it seems that the only way to pass credentials to a command ist to have them in the url. eg. https://user:[email protected].
That's sadly not enough for me as it looks like Github is not allowing Personal Access Tokens as password in urls.
It would be great to have the ability to just pass username, password combo to exec_command or have them read out of some environment variables.

issue with trying to get it working on lambda

Hello,

love this project as their isnt a alternative for git for python on lambdas.
subprocess.call(["pip","install","lambda-git"]) this is used to install the module but when i try to import afterwards i get this error.

"errorMessage": "[Errno 2] No such file or directory: '/var/task/vendor/git-2.4.3.tar'"

am i missing something ?

Can't view lambda once library is uploaded

I'm not sure how I'm supposed to use your installation $ pip install lambda-git for lambda. I tried zipping the files and adding them that way but when I use the web UI I get the error:

The deployment package of your Lambda function is too large to enable inline code editing. However, you can still invoke your function.

Suppress stdout?

I am passing my credentials in the git url when I call git clone. However, lambda-git is logging it back to stdout and revealing my credentials. Is there a way to suppress stdout logging for 1 git.exec_command invocation?

ssh support

Hi,

i've been trying to use lambda-git and it's been working great locally.
When using it in lambda, as i'm using ssh keys, the lambda fails with

Could not create directory '/home/sbx_user1051/.ssh'.\r\nFailed to add the host to the list of known hosts (/home/sbx_user1051/.ssh/known_hosts)

The id_rsa file is saved before the git command is issued in the /tmp/ folder.

The problem could be reproduced as follows , assuming the lambda has been packaged including lambda-git:

import git 
import os
env={
    "GIT_SSH_COMMAND": "ssh -i {} -o StrictHostKeyChecking=no".format("/tmp/id_rsa"),
    "HOME" : "/tmp/me"
}
def handler(event):
    git.exec_command('checkout', repo, "master", cwd="/tmp/repositories/",env=env)

which runs fine locally, but results in the exception mentionned above when run in lambda.

Environment

  • aws lambda
  • runtime : python 2.7
  • virtualenv

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.