jmollan / git-repo

Automatically exported from code.google.com/p/git-repo
Apache License 2.0
0 stars 0 forks source link

repo init -> fatal: [Errno 2] No such file or directory #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to sync the current code to my laptop from android.git.kernel.org.  
Whenever I run 'repo init', I get the following:

$ repo init -u git://android.git.kernel.org/platform/manifest.git
gpg: keyring `/home/blarson/.repoconfig/gnupg/secring.gpg' created
gpg: keyring `/home/blarson/.repoconfig/gnupg/pubring.gpg' created
gpg: /home/blarson/.repoconfig/gnupg/trustdb.gpg: trustdb created
gpg: key 920F5C65: public key "Repo Maintainer <repo@android.kernel.org>" 
imported
gpg: Total number processed: 1
gpg:               imported: 1

Getting repo ...
   from git://android.git.kernel.org/tools/repo.git
remote: Counting objects: 1045, done.
remote: Compressing objects: 100% (452/452), done.
remote: Total 1045 (delta 656), reused 929 (delta 572)
Receiving objects: 100% (1045/1045), 300.96 KiB | 112 KiB/s, done.
Resolving deltas: 100% (656/656), done.
From git://android.git.kernel.org/tools/repo
 * [new branch]      maint      -> origin/maint
 * [new branch]      master     -> origin/master
 * [new branch]      stable     -> origin/stable
 * [new tag]         v1.6.9.7   -> v1.6.9.7
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
 * [new tag]         v1.5       -> v1.5
 * [new tag]         v1.5.1     -> v1.5.1
 * [new tag]         v1.6       -> v1.6
 * [new tag]         v1.6.1     -> v1.6.1
 * [new tag]         v1.6.2     -> v1.6.2
 * [new tag]         v1.6.3     -> v1.6.3
 * [new tag]         v1.6.4     -> v1.6.4
 * [new tag]         v1.6.5     -> v1.6.5
 * [new tag]         v1.6.6     -> v1.6.6
 * [new tag]         v1.6.7     -> v1.6.7
 * [new tag]         v1.6.7.1   -> v1.6.7.1
 * [new tag]         v1.6.7.2   -> v1.6.7.2
 * [new tag]         v1.6.7.3   -> v1.6.7.3
 * [new tag]         v1.6.7.4   -> v1.6.7.4
 * [new tag]         v1.6.7.5   -> v1.6.7.5
 * [new tag]         v1.6.8     -> v1.6.8
 * [new tag]         v1.6.8.1   -> v1.6.8.1
 * [new tag]         v1.6.8.10  -> v1.6.8.10
 * [new tag]         v1.6.8.11  -> v1.6.8.11
 * [new tag]         v1.6.8.2   -> v1.6.8.2
 * [new tag]         v1.6.8.3   -> v1.6.8.3
 * [new tag]         v1.6.8.4   -> v1.6.8.4
 * [new tag]         v1.6.8.5   -> v1.6.8.5
 * [new tag]         v1.6.8.6   -> v1.6.8.6
 * [new tag]         v1.6.8.7   -> v1.6.8.7
 * [new tag]         v1.6.8.8   -> v1.6.8.8
 * [new tag]         v1.6.8.9   -> v1.6.8.9
 * [new tag]         v1.6.9     -> v1.6.9
 * [new tag]         v1.6.9.1   -> v1.6.9.1
 * [new tag]         v1.6.9.2   -> v1.6.9.2
 * [new tag]         v1.6.9.3   -> v1.6.9.3
 * [new tag]         v1.6.9.4   -> v1.6.9.4
 * [new tag]         v1.6.9.5   -> v1.6.9.5
 * [new tag]         v1.6.9.6   -> v1.6.9.6
fatal: unable to start /home/blarson/temp/.repo/repo/main.py
fatal: [Errno 2] No such file or directory

I've tried re-downloading ~/bin/repo and removing any ~/.repo* files, but no 
dice.  It works fine on my desktop, so I'm not sure what could be causing this. 
 All the files are present in .repo/repo.

Any ideas on how to debug further?

Original issue reported on code.google.com by bklarson@gmail.com on 17 Jun 2010 at 5:02

GoogleCodeExporter commented 9 years ago
Figured it out...

My global git config file contained core.autocrlf = true, which was adding 
windows line-endings to the python scripts.  Removing this setting fixed the 
problem.

Feel free to close this issue.

Original comment by bklarson@gmail.com on 25 Jun 2010 at 4:34

GoogleCodeExporter commented 9 years ago
Hi...
I have the some problem with you and i have tried the same method that you 
say,but it does't work.
The git config file is "\git\etc\gitconfig".And i removing core.autocrlf=true.
So,any ideas on how to debug further?
thanks.

Original comment by symagic....@gmail.com on 22 Nov 2011 at 9:10

GoogleCodeExporter commented 9 years ago
By 'global git config file', I was referring to ~/.gitconfig.  Have you checked 
there?

Original comment by bklarson@gmail.com on 22 Nov 2011 at 4:31

GoogleCodeExporter commented 9 years ago
Hi,

The problem is likely not with Python, but rather with the command interpreter, 
/bin/sh. The main.py and two other files in the git-repo repository have the 
#!/bin/sh shebang on the first line, and it is /bin/sh that doesn't like CR+LF 
line terminations.

In my mind repo should work even if git is configured with autocrlf=true. One 
way that I have tested successfully is to add a .gitattributes with the 
following content to the repository;

git_ssh text eol=lf
main.py text eol=lf
repo text eol=lf

If there are no objections I can push a change that adds a .gitattributes file 
with the above content.

Original comment by mmm...@gmail.com on 11 Feb 2013 at 8:40

GoogleCodeExporter commented 9 years ago
https://gerrit-review.googlesource.com/42221

Original comment by mmm...@gmail.com on 11 Feb 2013 at 9:17

GoogleCodeExporter commented 9 years ago
Fixed in https://gerrit-review.googlesource.com/42221

Original comment by david.pu...@sonymobile.com on 14 Feb 2013 at 7:53