repo: command not found?

我们两清 提交于 2019-12-10 13:13:09

问题


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:


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:


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.




回答4:


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




回答5:


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



来源:https://stackoverflow.com/questions/3682083/repo-command-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!