Home » Android » android – repo: command not found?

android – repo: command not found?

Posted by: admin June 15, 2020 Leave a comment


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?

How to&Answers:

You still need to install repo. repo is a third party tool built on top of git. See:
for how to install


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


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.


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


Case 1: Not installed google repo yet?

mkdir ~/bin
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

For version 1.26, it is 0cf5f52bcafb8e1d3ba0271b087312f6117b824af272bedd4ee969d52363a86b

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

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


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…

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…