I met a problem about repo init

1,399 views
Skip to first unread message

susanner

unread,
Feb 9, 2009, 9:25:20 PM2/9/09
to Repo and Gerrit Discussion
I am using ubuntu 8.10, and I think my repo has been successfully
installed according to https://sites.google.com/a/android.com/opensource/download
but when Initialize a Repo client, I forgot to entry ~/mydroid
directory, and falsely initialized repo under the directory /home/gzh,
and then during the process of initializing, I realized my false, so
when it demands me to input my name, I press ctrl-c to force it stop.
The print is as follow
gzh@gzh-desktop:~$ repo init -u git://android.git.kernel.org/platform/manifest.git
gpg: 钥匙环‘/home/gzh/.repoconfig/gnupg/secring.gpg’已建立
gpg: 钥匙环‘/home/gzh/.repoconfig/gnupg/pubring.gpg’已建立
gpg: /home/gzh/.repoconfig/gnupg/trustdb.gpg:建立了信任度数据库
gpg: 密钥 920F5C65:公钥“Repo Maintainer <re...@android.kernel.org>”已导入
gpg: 合计被处理的数量:1
gpg: 已导入:1

Getting repo ...
from git://android.git.kernel.org/tools/repo.git
warning: no common commits
remote: Counting objects: 269, done.
remote: Compressing objects: 100% (122/122), done.
remote: Total 269 (delta 136), reused 267 (delta 134)
Receiving objects: 100% (269/269), 153.23 KiB | 121 KiB/s, done.
Resolving deltas: 100% (136/136), 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
* [new tag] v1.5.1 -> v1.5.1
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
Getting manifest ...
from git://android.git.kernel.org/platform/manifest.git
warning: no common commits
remote: Counting objects: 61, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 61 (delta 22), reused 59 (delta 20)
Unpacking objects: 100% (61/61), done.
From git://android.git.kernel.org/platform/manifest
* [new branch] cdma-import -> origin/cdma-import
* [new branch] cupcake -> origin/cupcake
* [new branch] donut -> origin/donut
* [new branch] master -> origin/master
* [new branch] release-1.0 -> origin/release-1.0
From git://android.git.kernel.org/platform/manifest
* [new tag] android-1.0 -> android-1.0
Branch default set up to track remote branch refs/remotes/origin/
master.
Switched to a new branch "default"

Your Name [gzh]: ^Cgzh@gzh-desktop:~$

and then, I turned back to my home directory and entered mydroid
$ cd mydroid/
Once again, I use the command
$ repo init -u git://android.git.kernel.org/platform/manifest.git

this time error occurs, here is the print
gzh@gzh-desktop:~/mydroid$ repo init -u git://android.git.kernel.org/platform/manifest.git
fatal: A branch named 'default' already exists.
Traceback (most recent call last):
File "/home/gzh/.repo/repo/main.py", line 202, in <module>
_Main(sys.argv[1:])
File "/home/gzh/.repo/repo/main.py", line 186, in _Main
repo._Run(argv)
File "/home/gzh/.repo/repo/main.py", line 96, in _Run
cmd.Execute(copts, cargs)
File "/home/gzh/.repo/repo/subcmds/init.py", line 192, in Execute
self._SyncManifest(opt)
File "/home/gzh/.repo/repo/subcmds/init.py", line 124, in
_SyncManifest
m.StartBranch('default')
File "/home/gzh/.repo/repo/project.py", line 777, in StartBranch
raise GitError('%s checkout %s ' % (self.name, rev))
error.GitError: manifests checkout refs/remotes/origin/master

what should I do now ?

Shawn Pearce

unread,
Feb 10, 2009, 10:17:23 AM2/10/09
to repo-d...@googlegroups.com
Huh, I thought I replied to this last night, but groups ate my message.  Or perhaps I hit "Discard" by accident.  :-\

You need to "rm -rf ~/.repo" to clear out the area you accidentally created when you ran repo init in the wrong directory.  Then run repo init again within ~/mydroid.

susanner

unread,
Feb 11, 2009, 7:39:47 AM2/11/09
to Shawn Pearce, repo-discuss

Magnus Bäck

unread,
May 13, 2013, 8:53:07 AM5/13/13
to repo-d...@googlegroups.com
On Monday, May 13, 2013 at 02:40 EDT,
arivendu <arivendu...@gmail.com> wrote:

> I have a related problem. I need to initialize & sync repo to a
> separate dir like, "/home/user/project". I've tried running repo init
> in /home/user/project, but it still initializes repo in /home/user
> only. any help?

I think you have the exact same problem, i.e. you have a
/home/user/.repo directory that should be deleted (or moved
elsewhere if there's information there that you want to keep).

--
Magnus Bäck
ba...@google.com
Reply all
Reply to author
Forward
0 new messages