Fatal error while using repo

5,678 views
Skip to first unread message

Victor Ronin

unread,
Nov 19, 2008, 11:13:34 PM11/19/08
to Repo and Gerrit Discussion
Hi,

I tried to download Android sources and stuck on the step:
>repo init -u git://android.git.kernel.org/platform/manifest.git

I got following error:
Traceback (most recent call last):
File "/home/vronin/.repo/repo/main.py", line 202, in <module>
_Main(sys.argv[1:])
File "/home/vronin/.repo/repo/main.py", line 186, in _Main
repo._Run(argv)
File "/home/vronin/.repo/repo/main.py", line 96, in _Run
cmd.Execute(copts, cargs)
File "/home/vronin/.repo/repo/subcmds/init.py", line 192, in Execute
self._SyncManifest(opt)
File "/home/vronin/.repo/repo/subcmds/init.py", line 123, in
_SyncManifest
m.Sync_LocalHalf()
File "/home/vronin/.repo/repo/project.py", line 589, in
Sync_LocalHalf
lost = self._revlist(not_rev(rev), HEAD)
File "/home/vronin/.repo/repo/project.py", line 998, in _revlist
return self.work_git.rev_list(*args)
File "/home/vronin/.repo/repo/project.py", line 1145, in rev_list
p.stderr))
error.GitError: manifests rev-list ('^refs/remotes/origin/master',
'HEAD'): fatal: Not a git repository

I saw that it was mentioned here, but there was no solution in there
http://groups.google.com/group/repo-discuss/browse_thread/thread/ef42c1b212269bc/31fe0916518aff24?lnk=gst&q=%22Not+a+git+repository%22#31fe0916518aff24

I would appreciate any help on this subject.

Regards,
Victor

Shawn Pearce

unread,
Nov 20, 2008, 2:23:04 PM11/20/08
to repo-d...@googlegroups.com
Hmm.  What version of git and what version of Python?

I've been seeing some reports from people saying the initial clone of the manifest (what repo init is doing where when it crashed) fails, but I haven't ever been able to reproduce it on any system I have access to.

If its really predictable can you also try running with:

  export REPO_TRACE=1

and send the trace output of the commands it is running?

Victor Ronin

unread,
Nov 20, 2008, 7:13:44 PM11/20/08
to Repo and Gerrit Discussion
Git is 1.6.0.4

Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)

>If its really predictable can you also try running with:

yes. It's 100% reproducable.

I tried to use this, but didn't get any additional output.
>repo init -u git://android.git.kernel.org/platform/manifest.git export REPO_TRACE=1

Is there special file to which it dumps the trace of should I do any
additional actions?

Shawn Pearce

unread,
Nov 20, 2008, 7:17:25 PM11/20/08
to repo-d...@googlegroups.com
>REPO_TRACE=1 repo init -u git://android.git.kernel.org/platform/manifest.git

Victor Ronin

unread,
Nov 20, 2008, 9:29:14 PM11/20/08
to Repo and Gerrit Discussion
Here is what I got:

: git --version 1>|
: cd /home/vronin/.repo/manifests
: git symbolic-ref HEAD 1>| 2>|
: git config --file /home/vronin/.repo/manifests.git/config --null --
list 1>| 2>|
: git config --file /home/vronin/.gitconfig --null --list 1>| 2>|

: export GIT_DIR=/home/vronin/.repo/manifests.git
: git fetch origin
: git for-each-ref --format=%(objectname) %(refname) 1>| 2>|
: git symbolic-ref HEAD 1>| 2>|
: git rev-list ^refs/remotes/origin/master HEAD 1>| 2>|
Traceback (most recent call last):
File "/home/vronin/.repo/repo/main.py", line 202, in <module>
_Main(sys.argv[1:])
File "/home/vronin/.repo/repo/main.py", line 186, in _Main
repo._Run(argv)
File "/home/vronin/.repo/repo/main.py", line 96, in _Run
cmd.Execute(copts, cargs)
File "/home/vronin/.repo/repo/subcmds/init.py", line 192, in Execute
self._SyncManifest(opt)
File "/home/vronin/.repo/repo/subcmds/init.py", line 123, in
_SyncManifest
m.Sync_LocalHalf()
File "/home/vronin/.repo/repo/project.py", line 589, in
Sync_LocalHalf
lost = self._revlist(not_rev(rev), HEAD)
File "/home/vronin/.repo/repo/project.py", line 998, in _revlist
return self.work_git.rev_list(*args)
File "/home/vronin/.repo/repo/project.py", line 1146, in rev_list

greenfish

unread,
Dec 3, 2008, 10:35:10 AM12/3/08
to Repo and Gerrit Discussion
I Got the same problem

greenfish

unread,
Dec 3, 2008, 10:38:23 AM12/3/08
to Repo and Gerrit Discussion
It just can be fix by using python2.4.

On 11月21日, 上午10时29分, Victor Ronin <dyaot...@gmail.com> wrote:

gappy

unread,
Dec 11, 2008, 10:07:34 AM12/11/08
to Repo and Gerrit Discussion
I have same problem , but it was solved with following commands.

If your are in /home/user/mydroid, please execute following commands.

1:change directory
cd /home/user/mydroid
2:check if exists .repo file in current directory
ls -la
3:remove .repo file
rm -rf .repo
4:Do again
> I saw that it was mentioned here, but there was no solution in therehttp://groups.google.com/group/repo-discuss/browse_thread/thread/ef42...

FYL

unread,
Jan 12, 2009, 6:10:08 AM1/12/09
to Repo and Gerrit Discussion
I got same issue. I found the issue for me is caused by a hidden .repo
in parent directory rather current directory. After removing it, my
"repo init ..." is working.



On Dec 11 2008, 11:07 pm, gappy <tomoyuki_h...@ybb.ne.jp> wrote:
> I have same problem , but it was solved with following commands.
>
> If your are in /home/user/mydroid, please execute following commands.
>
> 1:change directory
> cd /home/user/mydroid
> 2:check if exists .repofile in current directory
> ls -la
> 3:remove .repofile
> rm -rf .repo
> 4:Do again
> repoinit-u git://android.git.kernel.org/platform/manifest.git

FYL

unread,
Jan 12, 2009, 6:20:06 AM1/12/09
to Repo and Gerrit Discussion
I got same issue. I found the issue for me is caused by a hidden .repo
in parent directory rather current directory. After removing it, my
"repo init ..." is working.



On Dec 11 2008, 11:07 pm, gappy <tomoyuki_h...@ybb.ne.jp> wrote:
> I have same problem , but it was solved with following commands.
>
> If your are in /home/user/mydroid, please execute following commands.
>
> 1:change directory
> cd /home/user/mydroid
> 2:check if exists .repofile in current directory
> ls -la
> 3:remove .repofile
> rm -rf .repo
> 4:Do again
> repoinit-u git://android.git.kernel.org/platform/manifest.git
>
> On 11月20日, 午後1:13, Victor Ronin <dyaot...@gmail.com> wrote:
>
> > Hi,
>
> > I tried to download Android sources and stuck on the step:
>
> > >repoinit-u git://android.git.kernel.org/platform/manifest.git
>
> > I got followingerror:

mic...@caughey.com

unread,
Jan 14, 2009, 6:32:07 PM1/14/09
to Repo and Gerrit Discussion
I have python 2.4 and no .repo in mydroid or in any of the parent
directories. I am getting this too. Can it be anything else?
> > > Victor- Hide quoted text -
>
> - Show quoted text -

Michael Caughey

unread,
Jan 14, 2009, 6:38:26 PM1/14/09
to repo-d...@googlegroups.com
never mind there was a .repo in the directory. my check for it was fat
fingered ls -l rather than ls -all, so now it works.

Horry

unread,
Jan 16, 2009, 10:45:04 AM1/16/09
to Repo and Gerrit Discussion
I have very bad experience during repo init and i tried all above
scenarios :
eg : rm -rf .repo , rm -rm cupcakedirectory , dos2unix repo even and i
open repo trace while still encounter issue as below . This become a
bad and unstable experience for normal users and it is hardly to know
why .

Shawn , would you comments on elsewhere i should go ahead and check ?
Would that be possible to enhance repo a precheck ? thanks ...

[horry@ myandroid]$ REPO_TRACE=1 repo init -u git://10.22.62.186/git/cupcake/manifest.git
Getting repo ...
from git://android.git.kernel.org/tools/repo.git
remote: Counting objects: 265, done.
cts: 100% (123/123), done.
remote: Total 265 (delta 134), reused 257 (delta 129)
Receiving objects: 100% (265/265), 152.64 KiB | 93 KiB/s, done.
Resolving deltas: 100% (134/134), done.
From git://android.git.kernel.org/tools/repo
* [new branch] for-gerrit2 -> origin/for-gerrit2
* [new branch] master -> origin/master
* [new branch] stable -> origin/stable
* [new tag] v1.5 -> v1.5
From git://android.git.kernel.org/tools/repo
* [new tag] v1.0 -> v1.0
* [new tag] v1.0.1 -> v1.0.1
* [new tag] v1.0.2 -> v1.0.2
* [new tag] v1.0.3 -> v1.0.3
* [new tag] v1.0.4 -> v1.0.4
* [new tag] v1.0.5 -> v1.0.5
* [new tag] v1.0.6 -> v1.0.6
* [new tag] v1.0.7 -> v1.0.7
* [new tag] v1.0.8 -> v1.0.8
* [new tag] v1.0.9 -> v1.0.9
* [new tag] v1.1 -> v1.1
* [new tag] v1.2 -> v1.2
* [new tag] v1.3 -> v1.3
* [new tag] v1.3.1 -> v1.3.1
* [new tag] v1.3.2 -> v1.3.2
* [new tag] v1.4 -> v1.4
* [new tag] v1.4.1 -> v1.4.1
* [new tag] v1.4.2 -> v1.4.2
* [new tag] v1.4.3 -> v1.4.3
* [new tag] v1.4.4 -> v1.4.4
: git --version 1>|
Getting manifest ...
from git://10.22.62.186/git/cupcake/manifest.git
: export GIT_DIR=/proj/repo01/horry/myandroid/.repo/manifests.git
: git init 1>| 2>|
: git config --file /proj/repo01/horry/myandroid/.repo/manifests.git/
config --null --list 1>| 2>|
: git config --file /proj/repo01/horry/myandroid/.repo/manifests.git/
config --unset-all core.bare 1>| 2>|
: git config --file /home/horry/.gitconfig --null --list 1>| 2>|
: git config --file /proj/repo01/horry/myandroid/.repo/manifests.git/
config --replace-all remote.origin.url git://10.22.62.186/git/cupcake/manifest.git
1>| 2>|
: git config --file /proj/repo01/horry/myandroid/.repo/manifests.git/
config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/
origin/* 1>| 2>|
: git fetch origin
fatal: The remote end hung up unexpectedly
: git rev-parse refs/remotes/origin/master^0 1>| 2>|
Traceback (most recent call last):
File "/proj/repo01/horry/myandroid/.repo/repo/main.py", line 202,
in ?
_Main(sys.argv[1:])
File "/proj/repo01/horry/myandroid/.repo/repo/main.py", line 186, in
_Main
repo._Run(argv)
File "/proj/repo01/horry/myandroid/.repo/repo/main.py", line 96, in
_Run
cmd.Execute(copts, cargs)
File "/proj/repo01/horry/myandroid/.repo/repo/subcmds/init.py", line
192, in Execute
self._SyncManifest(opt)
File "/proj/repo01/horry/myandroid/.repo/repo/subcmds/init.py", line
123, in _SyncManifest
m.Sync_LocalHalf()
File "/proj/repo01/horry/myandroid/.repo/repo/project.py", line 607,
in Sync_LocalHalf
self._InitWorkTree()
File "/proj/repo01/horry/myandroid/.repo/repo/project.py", line
1008, in _InitWorkTree
rev = self.bare_git.rev_parse('%s^0' % rev)
File "/proj/repo01/horry/myandroid/.repo/repo/project.py", line
1188, in runner
raise GitError('%s %s: %s' % (
error.GitError: manifests rev-parse: fatal: ambiguous argument 'refs/
remotes/origin/master^0': unknown revision or path not in the working
tree.
Use '--' to separate paths from revisions
Reply all
Reply to author
Forward
0 new messages