14

I am new to git and repo. I am in window 7 so I use cygwin. I have installed git from cygwin setup. After that I try to repo with the following command in cygwin.

$ repo init-u git://android.git.kernel.org/platform/manifest.git 

I get an error like these:

bash: repo: command not found

I think I need to setup cygwin for repo. What do I need next to get repo?

1

7 Answers 7

15

Case 1: Not installed google repo yet?

mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

Use the following checksums when required:

For version 1.25 it is d06f33115aea44e583c8669375b35aad397176a411de3461897444d247b6c220

For version 1.26, it is 0cf5f52bcafb8e1d3ba0271b087312f6117b824af272bedd4ee969d52363a86b

Case 2: Already have google repo Installed, still wondering what went wrong ?

Add PATH=~/bin:$PATH to the end of file ~/.bashrc and then run source ~/.bashrc

1
  • 1
    oh yeah, You are my life-safer!! It works! yeah thanks Oct 11, 2021 at 9:13
8

You still need to install repo. repo is a third party tool built on top of git. See: http://source.android.com/source/downloading.html for how to install

2
7

I have the same problem and I have to do: $ PATH=~/bin:$PATH every time I repo sync but at least it works.

2
  • 2
    saved my day with this least voted answer! Why is this not upvoted yet
    – A_rmas
    Aug 17, 2019 at 9:13
  • I followed case1, case2 from ishandutta2007 reply. Wasn't quite enough. After doing this, it worked!
    – Krish
    Aug 17, 2020 at 18:21
6

add line export PATH=~/bin:$PATH in file ~/.bashrc

3

edit .bash_profile and uncomment these fields. (any text editor will do)

# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
#   PATH="${HOME}/bin:${PATH}"
# fi

Restart CYGWIN.

0

Check and see if you have both .profile & .bash_profile in the working directory.

If you do, it's possible that the export command in both is actually conflicting in your shell. Making the output look something like this in Windows...

PATH="C:/Windows/path/to/repo/Windows/path/to/repo:$PATH"
export PATH

That's what happened to my bash shell anyway. It is correct that the 2 files interact with Bash or Cygwin differently, however if you have redundant inputs, they will compile together...

0

This answer for android build system error For Python 3

If you get a "/usr/bin/env 'python' no such file or directory" error message, use one of the following solutions: If your Ubuntu 20.04.2 LTS is a newly installed (vs. upgraded) Linux version:

sudo ln -s /usr/bin/python3 /usr/bin/python

f using Git version 2.19 or greater, you can specify --partial-clone when performing repo init. This makes use of Git's partial clone capability to only download Git objects when needed, instead of downloading everything. Because using partial clones means that many operations must communicate with the server, use the following if you're a developer and you're using a network with low latency:

repo init -u https://android.googlesource.com/platform/manifest -b master --partial-clone --clone-filter=blob:limit=10M

you can see document in Downloading the Source

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.