{"thread":{"id":"57084","subject":"Git SCM API remote","startedAt":"2021-12-15T12:57:55Z","lastAt":"2022-01-04T16:34:10Z","messageCount":4,"participants":["Ana Jovanovska","Konstantin Khomoutov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"444143","messageId":"CA++hZeHEVN6JZMdtXMjG2bDqerJjrFjhjYOry_rnWDgjTbQ8aA@mail.gmail.com","threadId":"57084","inReplyTo":null,"subject":"Git SCM API remote","fromName":"Ana Jovanovska","fromEmail":"ajovanovska@sumologic.com","sentAt":"2021-12-15T12:57:42Z","receivedAt":"2021-12-15T12:57:55Z","isPatch":false,"sender":{"key":"ajovanovska@sumologic.com","avatar":null},"body":"Hello,\n\nI am developing the integration with Git SCM and I will need your help\non this matter.\nThis is API remote doc https://www.git-scm.com/docs/api-remote . Can I\nhave more information on how to use it, do I need some additional\nlibrary?\n\nThank you in advance.\n\nKind regards,\n\n-- \nAna Jovanovska\n\nSoftware Engineer, Engineering\n\nM (389) 75 300-828\n"},{"id":"444148","messageId":"20211215155221.tzg55fxerpowj623@carbon","threadId":"57084","inReplyTo":"CA++hZeHEVN6JZMdtXMjG2bDqerJjrFjhjYOry_rnWDgjTbQ8aA@mail.gmail.com","subject":"Re: Git SCM API remote","fromName":"Konstantin Khomoutov","fromEmail":"kostix@bswap.ru","sentAt":"2021-12-15T15:52:21Z","receivedAt":"2021-12-15T16:01:50Z","isPatch":false,"sender":{"key":"kostix@bswap.ru","avatar":null},"body":"On Wed, Dec 15, 2021 at 01:57:42PM +0100, Ana Jovanovska wrote:\n\n> I am developing the integration with Git SCM and I will need your help\n> on this matter.\n> This is API remote doc https://www.git-scm.com/docs/api-remote .\nNo, it is not.\n\nUnfortunately, looks like your knowledge about Git itself is a bit lacking\ncurrently as you appear to not be aware of Git's terminology.\nI would say, reading a book on Git ([1] is good), and a couple of manuals on\nit, possibly starting with [2].\n\n> Can I have more information on how to use it, do I need some additional\n> library?\n\nGit itself does not ship anything you could call a library, but it is\ncomprised from a large number of individual commands (which are what you would\ncall \"command-line commands\") which are broadly divided into two categories -\nfor end users and for use by other commands; these groups are called\n\"porcelain\" and \"plumbing\". Call out to plumbing-layer commands is the typical\nway to automate Git.\n\nIf you need to somehow manipulate Git repositores - you did not say anything\nabout what that \"integration\" has to be about, - without having Git installed,\nyou may resort to 3rd-party libraries such as [3]. ISTR it also has wrapping\nlibraries in several programming languages.\n\nAlso note that there exist libraries for various programming languages which\nwrap calls to plumbing-layer Git commands, so they sort of implement something\nin between a \"pure library\" which does not call out to Git and calling Git\ndirectly.\n\n1. https://www.git-scm.com/book/en/v2\n2. https://www.git-scm.com/docs/git\n3. https://libgit2.org/\n\n"},{"id":"445355","messageId":"CA++hZeELoG1yMdu4pGpRx+2bBF63yNgOwV-UoB5=CH3pAg9jNA@mail.gmail.com","threadId":"57084","inReplyTo":"CA++hZeFiFAuCD=C-2xJJt3yd5guyJrssjtpAmAqYXkMQuRtfpw@mail.gmail.com","subject":"Re: Git SCM API remote","fromName":"Ana Jovanovska","fromEmail":"ajovanovska@sumologic.com","sentAt":"2022-01-03T14:51:10Z","receivedAt":"2022-01-03T14:51:22Z","isPatch":false,"sender":{"key":"ajovanovska@sumologic.com","avatar":null},"body":"Hello,\n\nThe libgit2, more specifically pygit2 helped me in creating\nrepositories, branches and getting a list of branches locally.\nBut with the integration (in Python), would like to connect to git\nremote server and to be able to do some of the git commands\n(https://www.pygit2.org/index.html) as mentioned.\nI looked into Remotes - RemoteCallbacks - credentials(url,\nusername_from_url, allowed_types)\n(https://www.pygit2.org/remotes.html#pygit2.RemoteCallbacks.credentials).\n\nCan we have support on this matter - how can we do it? Also if you are\navailable for a call, so to better understand, it will be great. Thank\nyou in advance.\n\nKind regards,\nAna\n\n\nOn Mon, Jan 3, 2022 at 3:45 PM Ana Jovanovska <ajovanovska@sumologic.com> wrote:\n>\n> Hello,\n>\n> The libgit2, more specifically pygit2 helped me in creating repositories, branches and getting a list of branches locally.\n> 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.\n> I looked into Remotes - RemoteCallbacks - credentials(url, username_from_url, allowed_types) (https://www.pygit2.org/remotes.html#pygit2.RemoteCallbacks.credentials).\n>\n> 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.\n>\n> Kind regards,\n> Ana\n>\n>\n> On Wed, Dec 15, 2021 at 4:52 PM Konstantin Khomoutov <kostix@bswap.ru> wrote:\n>>\n>> On Wed, Dec 15, 2021 at 01:57:42PM +0100, Ana Jovanovska wrote:\n>>\n>> > I am developing the integration with Git SCM and I will need your help\n>> > on this matter.\n>> > This is API remote doc https://www.git-scm.com/docs/api-remote .\n>> No, it is not.\n>>\n>> Unfortunately, looks like your knowledge about Git itself is a bit lacking\n>> currently as you appear to not be aware of Git's terminology.\n>> I would say, reading a book on Git ([1] is good), and a couple of manuals on\n>> it, possibly starting with [2].\n>>\n>> > Can I have more information on how to use it, do I need some additional\n>> > library?\n>>\n>> Git itself does not ship anything you could call a library, but it is\n>> comprised from a large number of individual commands (which are what you would\n>> call \"command-line commands\") which are broadly divided into two categories -\n>> for end users and for use by other commands; these groups are called\n>> \"porcelain\" and \"plumbing\". Call out to plumbing-layer commands is the typical\n>> way to automate Git.\n>>\n>> If you need to somehow manipulate Git repositores - you did not say anything\n>> about what that \"integration\" has to be about, - without having Git installed,\n>> you may resort to 3rd-party libraries such as [3]. ISTR it also has wrapping\n>> libraries in several programming languages.\n>>\n>> Also note that there exist libraries for various programming languages which\n>> wrap calls to plumbing-layer Git commands, so they sort of implement something\n>> in between a \"pure library\" which does not call out to Git and calling Git\n>> directly.\n>>\n>> 1. https://www.git-scm.com/book/en/v2\n>> 2. https://www.git-scm.com/docs/git\n>> 3. https://libgit2.org/\n>>\n>\n>\n> --\n>\n> Ana Jovanovska\n>\n> Software Engineer, Engineering\n>\n> M (389) 75 300-828\n>\n>\n>\n>\n>\n>\n>\n\n\n-- \n\nAna Jovanovska\n\nSoftware Engineer, Engineering\n\nM (389) 75 300-828\n"},{"id":"445429","messageId":"20220104163402.cbkwoj3agc2k4i4r@carbon","threadId":"57084","inReplyTo":"CA++hZeELoG1yMdu4pGpRx+2bBF63yNgOwV-UoB5=CH3pAg9jNA@mail.gmail.com","subject":"Re: Git SCM API remote","fromName":"Konstantin Khomoutov","fromEmail":"kostix@bswap.ru","sentAt":"2022-01-04T16:34:02Z","receivedAt":"2022-01-04T16:34:10Z","isPatch":false,"sender":{"key":"kostix@bswap.ru","avatar":null},"body":"Hi, Ana!\n\n(Reformatted; please do not top-post when participating in technical\ndiscussions, use what it called \"inline\" or \"interleaved\" style [1].)\n\nOn Mon, Jan 03, 2022 at 03:51:10PM +0100, Ana Jovanovska wrote:\n\n[...]\n>> Git itself does not ship anything you could call a library, but it is\n>> comprised from a large number of individual commands (which are what you would\n>> call \"command-line commands\") which are broadly divided into two categories -\n>> for end users and for use by other commands; these groups are called\n>> \"porcelain\" and \"plumbing\". Call out to plumbing-layer commands is the typical\n>> way to automate Git.\n[...]\n> The libgit2, more specifically pygit2 helped me in creating\n> repositories, branches and getting a list of branches locally.\n> But with the integration (in Python), would like to connect to git\n> remote server and to be able to do some of the git commands\n> (https://www.pygit2.org/index.html) as mentioned.\n> I looked into Remotes - RemoteCallbacks - credentials(url,\n> username_from_url, allowed_types)\n> (https://www.pygit2.org/remotes.html#pygit2.RemoteCallbacks.credentials).\n> \n> Can we have support on this matter - how can we do it? Also if you are\n> available for a call, so to better understand, it will be great. Thank\n> you in advance.\n\nI think you may still have certain misunderstanding about what Git is and what\nthe communication venue we're using for our exchange is about; I'll try to\nclear things up.\n\n\nThe first thing worth considering is that both Git and PyGit2 (and libgit2 the\nlatter uses) - all are independent pieces of what is called \"free software\" [2].\nThe fact they are independent means they may have conceptual relation - such\nas libgit2 knowing the format of Git repositories and hence being able to\nmanipulate them or PyGit2 physically calling out into libgit2 to perform its\ntasks - but they all are different projects run by different sets of people\nhaving different goals, code repositories, workflows, schedules etc. The only\nthing they have in common it that they allow to do something with Git\nrepositories.\n\nOur discussion is talking place on the mailing list dedicated to the\ndevelopment of Git itself: bugs in Git are reported here, patch sets\nimplementing new features or fixing bugs are posted here and are reviewed\nhere. That is all: both PyGit2 and libgit2 all have their own communication\nvenues and cannot be sensibly discussed here - if only because the developers\nworking on those projects may simply not be reading this list because they do\nnot have to. What follows, is that our discussion is off-topic for this list\nand, what is supposedly more important, has low chances of being helpful to\nyou.\n\n\nWhat I recommend is to use watever communication venue the PyGit2 developers\nrecommend using. From cursory glance over the project's site, I failed to find\na definitive place to ask questions but their project on Github has\n\"discussions\" enabled [3] so you could try to open one.\nAnother sort-of obvious thing to try is to use the \"pygit2\" tag on\nStackOverflow [4], but please first make sure you have searched for your\nproblem there using that tag.\n\n\nAs to your particular problem - „to be able to connect to git remote server\nand to be able to do some of the git commands” - it begs for clarification:\nare you merely after \"mundane\" Git tasks involving remote repositories - such\nas cloning, fetching, pushing, - or are you really after „advanced” stuff such\nas executing arbitrary Git commands on a remote server?\nIf it's about the former, a quick search on the PyGit2 site turns up\n\"recepies\" which should get you started (e.g. [5] covers cloning).\nIf it's about running arbitrary commands, this is completely another topic\nwhich is may be way harder to grok so I'd not go this route until we know you\nreally need it.\n\n\n 1. https://en.wikipedia.org/wiki/Posting_style\n 2. https://en.wikipedia.org/wiki/Free_software\n 3. https://github.com/libgit2/pygit2/discussions\n 4. https://stackoverflow.com/questions/tagged/pygit2\n 5. https://www.pygit2.org/recipes/git-clone-ssh.html\n\n"}]}