
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Gitty is a Node.js wrapper for Git. It's syntax resembles the Git command line syntax, executes common commands, and parses the output into operable objects.
$ npm install gitty
Note: If you encounter an error during installation on Mac OSX, make sure you have the XCode Command Line Tools installed. Gitty depends on pty.js for authenticated operations - which requires GCC compiler.
Run the the unit and integration tests with:
$ npm test
The integration tests require a network connection.
var git = require('gitty');
var myRepo = git('/path/to/repo');
Now you can call this instance of Repository
's methods. For example, to
execute git log
for myRepo
, you would do:
myRepo.log(function(err, log) {
if (err) return console.log('Error:', err);
// ...
});
For now, use the source, Luke. Pretty much everything you'll need is in
lib/repository.js
and it's very readable. Running the test suite will be of
use as well since all public methods are tested and will print to the console.
Since OpenSSH does not read input from stdin
for authentication, but rather a
psuedo-terminal - Gitty uses pty.js (https://github.com/chjj/pty.js/) to
spawn a pseudo-terminal for operations that may require authentication, such as
pull
, push
, and clone
.
Credentials are always passed as the last argument before the callback and are
optional. Below is an example of an authenticated Repository.push()
.
myRepo.push('origin', 'master', {
username: 'username',
password: 'password'
}, function(err, succ) {
if (err) return console.log(err);
// ...
});
This format is consistent for all authenticated operations. Keep this in mind if you are extending Gitty with an operation that requires authentication, and be sure to read the pty.js documentation.
Gitty was written by Gordon Hall (gordon@gordonwritescode.com)
Licensed under LGPLv3 license
FAQs
A Node.js wrapper for the Git CLI
The npm package gitty receives a total of 953 weekly downloads. As such, gitty popularity was classified as not popular.
We found that gitty demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.