[TriLUG] git push issue ( 20th )
Christopher Johnson via TriLUG
trilug at trilug.org
Mon Feb 20 19:32:53 EST 2023
Just kind of spitballing based on having used git a lot in my job but based
on this documentation
<https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks>, it looks like
the steps the client goes through when pushing are:
1. Client connects to remote host
2. Client pushes remote refs
3. Client runs pre-push hook
4. If successful, client pushes objects
Depending on the method for connecting (ssh, git, or http(s)), I'm
wondering if the test run is taking too long and the connection timeouts
with no data being sent in that amount of time. Depending on the protocol,
you might be able to configure it to keep the connection alive.
If not, depending on what the goal of the hook is, I would recommend:
1.) Enforcing that tests have to be run by only allowing users to push to
non-mainline branches and use Pull Requests (PRs) and PR policies (as hooks
aren't included in the repository data that gets shared with the server)
2.) Using the pre-commit hook to run the tests. This has the added benefit
of not requiring you to `git commit --amend` when you fix the tests
Hope that helps,
CJ
On Mon, Feb 20, 2023 at 11:01 AM Brian McCullough via TriLUG <
trilug at trilug.org> wrote:
> On Mon, Feb 20, 2023 at 10:30:48AM -0500, Triangle Linux Users Group
> discussion list wrote:
> >
> >
> > Fairly early during that "push" process, I get a message that
> > "Connection to bitbucket.org closed by remote host." I don't know
> > whether that is significant or relevant or not.
>
> I am suspicious of this message, because if I do not see this message,
> the push seems to be successful. I have been playing around with the
> order of execution, but that doesn't seem to matter.
>
>
> > Any bright ideas?
> >
> >
> >
> > Thanks,
> > Brian
>
>
> --
> This message was sent to: CJ <cdj2981 at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
> address.
> TriLUG mailing list : https://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web :
> https://www.trilug.org/mailman/options/trilug/cdj2981%40gmail.com
> Welcome to TriLUG: https://trilug.org/welcome
--
Christopher Johnson
Email: cdj2981 at gmail.com
More information about the TriLUG
mailing list