Re: "remote origin already exists" when running dpt alioth-repo
Hi again,
Axel Beckert wrote:
> > However, looks like there is something more complicated going on
> > than I thought.
>
> Slightly more complicated, but not much. :-)
>
> dpt alitoh-repo also adds the newly created repo to our .mrconfig
Actually it's /git/pkg-perl/setup-repository which does that and "dpt
alioth-repo" calls that one via SSH with the right parameters.
> > > > fatal: remote origin already exists.
> > > >
> > > > Note the last error. Whilst I understand the error message, I'm not sure
> > > > why it appears to be trying to create a new remote when this is the
> > > > first time I am pushing the package.
> > >
> > > You're understanding it correctly. The purpose of that script is to
> > > configure _and_ first-time push a so far only local git repo so that
> > > it works as expected together with Alioth.
> > >
> > > > What am I doing wrong?
> > >
> > > Your git repository likely already has a remote named "origin".
> >
> > It does, but that was added by dh-make-perl (I assume)
>
> Hrm. Can't remember. I think it doesn't. But a previous and failed "dpt
> alioth-repo call" would have.
>
> > # git remote -v
> > origin ssh://git.debian.org/git/pkg-perl/packages/libdpkg-parse-perl.git
> > (fetch)
> > origin ssh://git.debian.org/git/pkg-perl/packages/libdpkg-parse-perl.git
> > (push)
>
> Looks as expected, indeed.
With pkg-perl-tools 0.21 this will no more happen. :-) I've just added
some code to "dpt alioth-repo" which aborts if a remote named "origin"
already exists:
https://anonscm.debian.org/cgit/pkg-perl/packages/pkg-perl-tools.git/commit/?id=87ad5a7
It also suggests this in the emitted error message:
> > > Try "git remote rename origin old-origin"
Regards, Axel
--
,''`. | Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
`- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
Reply to: