eredi93 / lambda-git Goto Github PK
View Code? Open in Web Editor NEWA git binary installed through PyPI for AWS Lambda
License: MIT License
A git binary installed through PyPI for AWS Lambda
License: MIT License
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.
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 ?
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.
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?
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.