Git development
 help / color / mirror / Atom feed
From: Konstantin Khomoutov <kostix@bswap.ru>
To: Ana Jovanovska <ajovanovska@sumologic.com>
Cc: Konstantin Khomoutov <kostix@bswap.ru>,
	git@vger.kernel.org, Enrico Benzoni <ebenzoni@sumologic.com>,
	Michele Zambelli <mzambelli@sumologic.com>
Subject: Re: Git SCM API remote
Date: Tue, 4 Jan 2022 19:34:02 +0300	[thread overview]
Message-ID: <20220104163402.cbkwoj3agc2k4i4r@carbon> (raw)
In-Reply-To: <CA++hZeELoG1yMdu4pGpRx+2bBF63yNgOwV-UoB5=CH3pAg9jNA@mail.gmail.com>

Hi, Ana!

(Reformatted; please do not top-post when participating in technical
discussions, use what it called "inline" or "interleaved" style [1].)

On Mon, Jan 03, 2022 at 03:51:10PM +0100, Ana Jovanovska wrote:

[...]
>> Git itself does not ship anything you could call a library, but it is
>> comprised from a large number of individual commands (which are what you would
>> call "command-line commands") which are broadly divided into two categories -
>> for end users and for use by other commands; these groups are called
>> "porcelain" and "plumbing". Call out to plumbing-layer commands is the typical
>> way to automate Git.
[...]
> The libgit2, more specifically pygit2 helped me in creating
> repositories, branches and getting a list of branches locally.
> But with the integration (in Python), would like to connect to git
> remote server and to be able to do some of the git commands
> (https://www.pygit2.org/index.html) as mentioned.
> I looked into Remotes - RemoteCallbacks - credentials(url,
> username_from_url, allowed_types)
> (https://www.pygit2.org/remotes.html#pygit2.RemoteCallbacks.credentials).
> 
> Can we have support on this matter - how can we do it? Also if you are
> available for a call, so to better understand, it will be great. Thank
> you in advance.

I think you may still have certain misunderstanding about what Git is and what
the communication venue we're using for our exchange is about; I'll try to
clear things up.


The first thing worth considering is that both Git and PyGit2 (and libgit2 the
latter uses) - all are independent pieces of what is called "free software" [2].
The fact they are independent means they may have conceptual relation - such
as libgit2 knowing the format of Git repositories and hence being able to
manipulate them or PyGit2 physically calling out into libgit2 to perform its
tasks - but they all are different projects run by different sets of people
having different goals, code repositories, workflows, schedules etc. The only
thing they have in common it that they allow to do something with Git
repositories.

Our discussion is talking place on the mailing list dedicated to the
development of Git itself: bugs in Git are reported here, patch sets
implementing new features or fixing bugs are posted here and are reviewed
here. That is all: both PyGit2 and libgit2 all have their own communication
venues and cannot be sensibly discussed here - if only because the developers
working on those projects may simply not be reading this list because they do
not have to. What follows, is that our discussion is off-topic for this list
and, what is supposedly more important, has low chances of being helpful to
you.


What I recommend is to use watever communication venue the PyGit2 developers
recommend using. From cursory glance over the project's site, I failed to find
a definitive place to ask questions but their project on Github has
"discussions" enabled [3] so you could try to open one.
Another sort-of obvious thing to try is to use the "pygit2" tag on
StackOverflow [4], but please first make sure you have searched for your
problem there using that tag.


As to your particular problem - „to be able to connect to git remote server
and to be able to do some of the git commands” - it begs for clarification:
are you merely after "mundane" Git tasks involving remote repositories - such
as cloning, fetching, pushing, - or are you really after „advanced” stuff such
as executing arbitrary Git commands on a remote server?
If it's about the former, a quick search on the PyGit2 site turns up
"recepies" which should get you started (e.g. [5] covers cloning).
If it's about running arbitrary commands, this is completely another topic
which is may be way harder to grok so I'd not go this route until we know you
really need it.


 1. https://en.wikipedia.org/wiki/Posting_style
 2. https://en.wikipedia.org/wiki/Free_software
 3. https://github.com/libgit2/pygit2/discussions
 4. https://stackoverflow.com/questions/tagged/pygit2
 5. https://www.pygit2.org/recipes/git-clone-ssh.html


      reply	other threads:[~2022-01-04 16:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 12:57 Git SCM API remote Ana Jovanovska
2021-12-15 15:52 ` Konstantin Khomoutov
     [not found]   ` <CA++hZeFiFAuCD=C-2xJJt3yd5guyJrssjtpAmAqYXkMQuRtfpw@mail.gmail.com>
2022-01-03 14:51     ` Ana Jovanovska
2022-01-04 16:34       ` Konstantin Khomoutov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220104163402.cbkwoj3agc2k4i4r@carbon \
    --to=kostix@bswap.ru \
    --cc=ajovanovska@sumologic.com \
    --cc=ebenzoni@sumologic.com \
    --cc=git@vger.kernel.org \
    --cc=mzambelli@sumologic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox