您的位置:首页 > 运维架构 > Linux

The Linux Kernel Archives-mainline获取方法

2010-10-12 20:23 507 查看
今天(20110814)发现rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git用不了了,所以直接用

git clone http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
发现可以使用了,或许是3.0出来以后,对服务器内核仓库作了调整吧。之前的linux-2.6.git仓库已经没有出现在http://kernel.org/了,mainline仓库已经修改为

http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git



在mainline中不再出现版本号(以前的2.6版本为linux-2.6.git,现在修改为linux.git),这样即使出现大的版本变动,依然使用相同的仓库!这也许是版本仓库管理的改进吧。

查看linux-2.6.git和linux.git仓库发现log一样,服务器上估计只是改名字而已。

[b]http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

[/b]

[b][b]http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

[/b][/b]

-------------------------------------------------------------------------------------------------------------------------------------------

之前尝试过很多次去获取The Linux Kernel Archives-mainline源码,但均未成功。那时使用的方法是:

git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

提示错误是:reset by peer。。。

于是,重新在网上找了下载的方法,如下:

[root@GDB linux-2.6]# git remote -v

origin rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git (fetch)

origin rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git (push)

说明:

git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/
#如果掉线可以使用下面的命令进行断点续传,以后用这个关键字有人就可以搜索到解决方法了,:)
#注意:下面仅用于断点续传,如果上个命令圆满成功,平时只须运行不带参数的git-pull
cd linux-2.6
git pull rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/
(git fetch git checkout origin/master -b master)
除此外,还找到如下类似方法,只是完全测试:

+Now let's use git to download the latest git HEAD (the current head of Linus'
+development tree). Execute these commands to do this :
+
+ $ git clone /
+ rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git /
+ linux-2.6
+ $ cd linux-2.6
+ $ rsync -a --verbose --stats --progress /
+ rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/ /
+ .git/
+
+The kernel tree is very large. This constitutes downloading several hundred
+megabytes of data, so be patient.
+When the download finishes you'll have a brand sparkling new git HEAD linux
+kernel source tree in ~/linux-kernel/linux-2.6

我的Log:

[root@GDB linux-2.6]# git remote show origin

MOTD:

MOTD: Welcome to the Linux Kernel Archive.

MOTD:

MOTD: Due to U.S. Exports Regulations, all cryptographic software on this

MOTD: site is subject to the following legal notice:

MOTD:

MOTD: This site includes publicly available encryption source code

MOTD: which, together with object code resulting from the compiling of

MOTD: publicly available source code, may be exported from the United

MOTD: States under License Exception "TSU" pursuant to 15 C.F.R. Section

MOTD: 740.13(e).

MOTD:

MOTD: This legal notice applies to cryptographic software only.

MOTD: Please see the Bureau of Industry and Security,

MOTD: http://www.bis.doc.gov/ for more information about current

MOTD: U.S. regulations.

MOTD:

MOTD:

MOTD: Welcome to the Linux Kernel Archive.

MOTD:

MOTD: Due to U.S. Exports Regulations, all cryptographic software on this

MOTD: site is subject to the following legal notice:

MOTD:

MOTD: This site includes publicly available encryption source code

MOTD: which, together with object code resulting from the compiling of

MOTD: publicly available source code, may be exported from the United

MOTD: States under License Exception "TSU" pursuant to 15 C.F.R. Section

MOTD: 740.13(e).

MOTD:

MOTD: This legal notice applies to cryptographic software only.

MOTD: Please see the Bureau of Industry and Security,

MOTD: http://www.bis.doc.gov/ for more information about current

MOTD: U.S. regulations.

MOTD:

* remote origin

Fetch URL: rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

Push URL: rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

HEAD branch: (unknown)

Remote branch:

master tracked

Local branch configured for 'git pull':

master merges with remote master

Local ref configured for 'git push':

master pushes to master (local out of date)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: