下源码报Unable to look up android.git.kernel.org(port 9418) Name or service not know

xqhrs232 2011-03-23 11:09:14
下载android源码报fatal: Unable to look up android.git.kernel.org (port 9418) (Name or service not known),为什么?


下载源码报Unable to look up android.git.kernel.org (port 9418) (Name or service not known),为什么?

下源码报Unable to look up android.git.kernel.org(port 9418) Name or service not known
...全文
6310 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
xqhrs232 2012-02-02
  • 打赏
  • 举报
回复
获取Android源码时如何解决【fatal: Unable to look up android.git.kernel.org (port 9418) (Name or service not known)】的问题
http://www.cnblogs.com/yyangblog/archive/2011/03/24/1993796.html
xqhrs232 2012-02-02
  • 打赏
  • 举报
回复
今天又玩不转了,看来不做很详细的笔记真不行,老得重新摸索一遍



repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
fatal:cannot get https://android.googlesource.com/toos/repo/clone.bundle
fatal:error[Errno -2] Name or service not known


xqhrs232 2012-02-02
  • 打赏
  • 举报
回复
今天又玩不转了,看来不做很详细的笔记真不行,老得重新摸索一遍



repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
fatal:cannot get https://android.googlesource.com/toos/repo/clone.bundle
fatal:error[Errno -2] Name or service not known


qthsrs232 2011-06-30
  • 打赏
  • 举报
回复
最近又遇到这个问题,原来还是对GIT没使用对


4. config git to use the script
$ git config --global core.gitproxy "http-proxy-gw for kernel.org"


xqhrs232 2011-03-23
  • 打赏
  • 举报
回复
Android Repo 超时的解决方法

http://blog.csdn.net/shaohui99/archive/2010/06/29/5702483.aspx


下载Google的Android操作系统的时候卡在下面一步:

Getting repo ...
from git://android.git.kernel.org/tools/repo.git
android.git.kernel.org[0: 204.152.191.45]: errno=Connection timed out
android.git.kernel.org[0: 130.239.17.12]: errno=Connection timed out
android.git.kernel.org[0: 149.20.20.141]: errno=Connection timed out
android.git.kernel.org[0: 199.6.1.176]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)

找各种原因,可能是公司用的局域网ISP将Git的端口9418给封了,因为http://android.git.kernel.org是可以访问的。后来搜了一下知道很多git服务器同时提供端口80的下载。解决方法如下:

1.将命令行中的git://android.git.kernel.org换成http://android.git.kernel.org,

2.修改文件repo将里面的

REPO_URL='git://android.git.kernel.org/tools/repo.git' 改成

REPO_URL='http://android.git.kernel.org/tools/repo.git'

3. 修改文件.repo/manifests/default.xml将其中的 fetch="git://android.git.kernel.org/" 改成

fetch="http://android.git.kernel.org/"

这样就可以下载同步Android的源代码了



本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/shaohui99/archive/2010/06/29/5702483.aspx
xqhrs232 2011-03-23
  • 打赏
  • 举报
回复
公司的电脑,通过代理上网。UBUNTU上网是没有问题的。因为9418这个端口被禁止的原因吗?

就像禁止80端口就可以禁止QQ上网一样?不明白,看网上没太多人遇到这样的问题啊!
儿大不由爷 2011-03-23
  • 打赏
  • 举报
回复
连接不上了呗
xqhrs232 2011-03-23
  • 打赏
  • 举报
回复
关于android分支无法下载的问题,revision froyo in manifests not found

http://blog.csdn.net/yihui8/archive/2011/02/25/6208647.aspx



当用如下命令下载不在froyo分支时,

view plaincopy to clipboardprint?
$ cd ~
$ mkdir myandroid
$ cd myandroid
$ curl http://android.git.kernel.org/repo > ./repo
$ chmod a+x ./repo
$ ./repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo
$ cp /opt/imx-android-r9.4/code/r9.4/default.xml .repo/manifests/default.xml (To avoid loading unnecessary gits from Google repo, meanwhile load some gits from Google repo which is not included in default manifest)
$ ./repo sync
$ cd ~
$ mkdir myandroid
$ cd myandroid
$ curl http://android.git.kernel.org/repo > ./repo
$ chmod a+x ./repo
$ ./repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo
$ cp /opt/imx-android-r9.4/code/r9.4/default.xml .repo/manifests/default.xml (To avoid loading unnecessary gits from Google repo, meanwhile load some gits from Google repo which is not included in default manifest)
$ ./repo sync


改用命令,记住一定要全部删掉原来repo的东西,否则会有很多错误!!!

view plaincopy to clipboardprint?
rm -fr *
./repo init -u git://android.git.kernel.org/platform/manifest.git -b android-2.2.1_r1



本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/yihui8/archive/2011/02/25/6208647.aspx
xqhrs232 2011-03-23
  • 打赏
  • 举报
回复
执行如下命令报错
repo init -u git://android.git.kernel.org/platform/manifest.git -b Froyo //for 2.2


error:revision Froyo in manifests not found
xqhrs232 2011-03-23
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 qthsrs232 的回复:]
C/C++ code


***************************************
3.代理设置.
***************************************
因为在公司需要用到代理才能连接外网.所以repo命令也要用到代理设置.
具体如下.
因为git的代理是借助其他软件实现的.我们需要下载一个connet.c编译,在新建一个proxy文……
[/Quote]
按这个方法整了一下,还真的是可以下ANDROID的源代码了。但只能下Android 1.5:Cupcake版本
,下Android 2.2:Froyo就报错。不知道为什么。
我用的命令是:
repo init -u git://android.git.kernel.org/platform/manifest.git -b Froyo //for 2.2

repo init -u git://android.git.kernel.org/platform/manifest.git -b Cupcake //for 1.5


qthsrs232 2011-03-23
  • 打赏
  • 举报
回复


***************************************
3.代理设置.
***************************************
因为在公司需要用到代理才能连接外网.所以repo命令也要用到代理设置.
具体如下.
因为git的代理是借助其他软件实现的.我们需要下载一个connet.c编译,在新建一个proxy文件。
(1)下载conect.c下载地址:http://www.newbupt.org/wForum/disparticle.php?boardName=Linux&ID=20184,下载附件内容
(2)gcc -o connect connect.c //编译成目标文件
mv connect ~/bin //移动到~/bin
(3)设置一个wrapper
echo "/home/liu/bin/connect -H http://10.99.60.201:8080 $@" >> ~/bin/proxy //注意不要漏掉$@
chmod +x ~/bin/proxy
(4)完成之后记得执行一下 proxy啊。方法:“. Proxy”
******
proxy的写法还有一个版本,我就是用的这个版本调通的。
1..在目录下/home/liu/bin下新建一个proxy.sh 的文件,
内容如下:#!/bin/sh# /home/proxy.sh# http proxy settingexport HTTP_PROXY=10.99.60.201:8080export http_proxy=$HTTP_PROXY# set git to use ssh over http proxyexport GIT_SSH="/home/liu/bin/socks-ssh.sh"export GIT_PROXY_COMMAND="/home/liu/bin/socks-gw.sh"
2.在目录下/home/liu/bin下新建一个socks-ssh.sh文件,
内容如下:#!/bin/sh# /home/liu/bin/socks-ssh.shssh -o ProxyCommand="/home/liu/bin/socks-gw.sh %h %p" $@
3.在目录下/home/liu/bin下新建一个socks-gw.sh文件.
内容如下.#!/bin/sh# /home/liu/bin/socks-gw.sh# This script connects to a HTTP proxy using connect.cconnect -H 10.99.60.201:8080 $@
注意:不要忘记执行一下“. proxy”(中间有空格)
********

qthsrs232 2011-03-23
  • 打赏
  • 举报
回复
如何用repo下载android源码 - liujishen的专栏 - CSDN博客1 (转载)
http://www.360doc.com/content/11/0323/14/6604293_103844804.shtml



***************************************3.代理设置.***************************************因为在公司需要用到代理才能连接外网.所以repo命令也要用到代理设置.具体如下.因为git的代理是借助其他软件实现的.我们需要下载一个connet.c编译,在新建一个proxy文件。(1)下载conect.c下载地址:http://www.newbupt.org/wForum/disparticle.php?boardName=Linux&ID=20184,下载附件内容(2)gcc -o connect connect.c //编译成目标文件 mv connect ~/bin //移动到~/bin(3)设置一个wrapper echo "/home/liu/bin/connect -H http://10.99.60.201:8080 $@" >> ~/bin/proxy //注意不要漏掉$@ chmod +x ~/bin/proxy (4)完成之后记得执行一下 proxy啊。方法:“. Proxy”******proxy的写法还有一个版本,我就是用的这个版本调通的。1..在目录下/home/liu/bin下新建一个proxy.sh 的文件,内容如下:#!/bin/sh# /home/proxy.sh# http proxy settingexport HTTP_PROXY=10.99.60.201:8080export http_proxy=$HTTP_PROXY# set git to use ssh over http proxyexport GIT_SSH="/home/liu/bin/socks-ssh.sh"export GIT_PROXY_COMMAND="/home/liu/bin/socks-gw.sh"2.在目录下/home/liu/bin下新建一个socks-ssh.sh文件,内容如下:#!/bin/sh# /home/liu/bin/socks-ssh.shssh -o ProxyCommand="/home/liu/bin/socks-gw.sh %h %p" $@3.在目录下/home/liu/bin下新建一个socks-gw.sh文件.内容如下.#!/bin/sh# /home/liu/bin/socks-gw.sh# This script connects to a HTTP proxy using connect.cconnect -H 10.99.60.201:8080 $@注意:不要忘记执行一下“. proxy”(中间有空格)********
qthsrs232 2011-03-23
  • 打赏
  • 举报
回复
看到下面这一段不知道什么意思


http://xiadefei.blogspot.com/2009/03/git.html
1. download and compile connect.c.
$ cd ~/bin
$ curl http://www.meadowy.org/~gotoh/ssh/connect.c > connect.c
$ gcc -o connect connect.c

2. create simple shell script
#!/bin/sh
# Filename: ~/bin/http-proxy-gw
# This script connects to an HTTP proxy using connect.c
connect -H http://yourproxyaddress:proxyport $@
bob注释:这里的$@表示什么意思呢?

3. set the execution permission
$ chmod +x ~/bin/http-proxy-gw

4. config git to use the script
$ git config --global core.gitproxy "http-proxy-gw for kernel.org"


我这边还是不行啊 ,

我这边最后是:
git-config --global core.gitproxy "http-proxy-gw"
BobZhang:/home/work/data3/kernel_source/git #
BobZhang:/home/work/data3/kernel_source/git # git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linx-2.6
Initialized empty Git repository in /home/work/data3/kernel_source/git/linx-2.6/.git/
FATAL: failed to begin relaying via HTTP.
fatal: The remote end hung up unexpectedly
fetch-pack from 'git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git' failed.


xqhrs232 2011-03-23
  • 打赏
  • 举报
回复

80,349

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧