Re: commit to gitrepo-dev ends up in gitrepo.FreeBSD.org ?

From: Ulrich Spörlein <uqs_at_freebsd.org>
Date: Mon, 24 May 2021 20:43:50 +0200
On Mon, 2021-05-24 at 17:35:33 +0200, Kurt Jaeger wrote:
>Hi!
>
>> > This is *really* strange.
>> >
>> > I've tried to test-commit to the test repo using
>> >
>> >   git push git_at_gitrepo-dev.FreeBSD.org:ports.git
>> >
>> > and it ended up in the production repo somehow ?
>
>> Looks like you set up the remotes badly maybe? Please paste in your
>> .git/config
>
>Here's .gitconfig.
>
>-------------
>
># This is Git's per-user configuration file.
>
>[includeIf "gitdir:~/git/"]
>	path = ~/.git-github
>
>[includeIf "gitdir:~/g/"]
>	path = ~/.git-fbsd
>
>[includeIf "gitdir:~/tg/"]
>	path = ~/.git-fbsd
>
>[includeIf "gitdir:~/h/"]
>	path = ~/.git-fbsd
>
>[includeIf "gitdir:/pou/ports/default/"]
>	path = ~/.git-fbsd
>
>[init]
>    defaultBranch = main
>
>[pager]
>    diff = false
>    show = false
>
>[color]
>    ui = off
>
>----------------
>
>The directory-specifics are just different email values, e.g. .git-fbsd:
>
>----------------
>[user]
>        name = Kurt Jaeger
>        email = pi_at_FreeBSD.org
>
>----------------

I don't know what this is, but this is clearly not the .git/config file 
that's inside your repository that has the odd remote behavior.

It looks something like this (and I assume you have mixed up a remote 
name and the URL it should point to):

% cat .git/config
[core]
         repositoryformatversion = 0
         filemode = true
         bare = false
         logallrefupdates = true
         hooksPath = .hooks
[remote "origin"]
         url = https://git.freebsd.org/ports.git
         fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
         remote = origin
         merge = refs/heads/main
[remote "github"]
         url = git_at_github.com:freebsd/freebsd-ports.git
         fetch = +refs/heads/*:refs/remotes/github/*
[remote "freebsd"]
         url = ssh://git_at_repo.freebsd.org/ports.git
         fetch = +refs/heads/*:refs/remotes/freebsd/*

hth
Uli
Received on Mon May 24 2021 - 18:43:50 UTC

Original text of this message