Security Advisories (2)
CVE-2014-9390 (2020-02-12)

Git before 1.8.5.6, 1.9.x before 1.9.5, 2.0.x before 2.0.5, 2.1.x before 2.1.4, and 2.2.x before 2.2.1 on Windows and OS X; Mercurial before 3.2.3 on Windows and OS X; Apple Xcode before 6.2 beta 3; mine all versions before 08-12-2014; libgit2 all versions up to 0.21.2; Egit all versions before 08-12-2014; and JGit all versions before 08-12-2014 allow remote Git servers to execute arbitrary commands via a tree containing a crafted .git/config file with (1) an ignorable Unicode codepoint, (2) a git~1/config representation, or (3) mixed case that is improperly handled on a case-insensitive filesystem.

CVE-2018-25032 (2022-03-25)

zlib before 1.2.12 allows memory corruption when deflating (i.e., when compressing) if the input has many distant matches.

NAME

Git::Raw::Remote - Git remote class

VERSION

version 0.19

SYNOPSIS

use Git::Raw;

# open the Git repository at $path
my $repo = Git::Raw::Repository -> open($path);

# add a new remote
my $remote = Git::Raw::Remote -> create($repo, 'origin', $url);

# set the acquire credentials callback
$remote -> cred_acquire(sub { Git::Raw::Cred -> plaintext($usr, $pwd) });

# connect the remote
$remote -> connect('fetch');

# fetch from the remote and update the local tips
$remote -> download;
$remote -> update_tips;

# disconnect
$remote -> disconnect;

DESCRIPTION

A Git::Raw::Remote represents a Git remote.

METHODS

create( $repo, $name, $url )

Create a remote with the default fetch refspec and add it to the repository's configuration.

name( [ $name ] )

Retrieve the name of the remote. If $name is passed, the remote's name will be updated and returned.

url( [ $url ] )

Retrieve the URL of the remote. If $url is passed, the remote's URL will be updated and returned.

fetchspec( [ $spec ] )

Retrieve the fetchspec of the remote. If $spec is passed, the remote's fetchspec will be updated and returned.

pushspec( [ $spec ] )

Retrieve the pushspec of the remote. If $spec is passed, the remote's pushspec will be updated and returned.

cred_acquire( $callback )

Run $callback any time authentication is required to connect to the remote repository. The callback receives a string containing the URL of the remote, and it must return a Git::Raw::Cred object.

connect( $direction )

Connect to the remote. The direction can be either "fetch" or "push".

disconnect( )

Disconnect the remote.

download( )

Download the remote packfile.

save( )

Save the remote to its repository's config.

update_tips( )

Update the tips to the new status.

is_connected( )

Check if the remote is connected.

AUTHOR

Alessandro Ghedini <alexbio@cpan.org>

LICENSE AND COPYRIGHT

Copyright 2012 Alessandro Ghedini.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.