跳至主要内容

install git server

all the precedure is written in this article.
 http://git-scm.com/book/zh/%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E7%9A%84-Git-%E5%9C%A8%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E9%83%A8%E7%BD%B2-Git
 但是我却碰到了一个很奇怪的问题,就是无论如何也clone不了新建的项目:
 fatal: protocol error: bad line length character: fatal: The remote end hung up unexpectedly 
有人说可以看一下这个命令的输出:
ssh mathieu@192.168.1.52 git-receive-pack /var/www/gitproject.git
然后我就看了:
This is BASH 4.2 - DISPLAY on :0.0

Thu Mar 21 15:44:29 CET 2013
00760000000000000000000000000000000000000000 capabilities^{} report-status delete-refs side-band-64k quiet ofs-delta
看起来最后一行好像是git的输出,而且没有错。那前面三行是什么东西?这段话好像每次ssh都会给我,于是去看了一眼.barshrc
# Looks best on a black background.....
#echo -e "${CYAN}This is BASH ${RED}${BASH_VERSION%.*}${CYAN} - DISPLAY on ${RED}$DISPLAY${NC}\n"
#date
#if [ -x /usr/games/fortune ]; then
#    /usr/games/fortune -s     # makes our day a bit more fun.... :-)
#fi

#function _exit()       # function to run upon exit of shell
#{
#    echo -e "${RED}Hasta la vista, baby${NC}"
#}
#trap _exit EXIT
把这些注释掉就好了,如此人说说:
The complaint is actually that the remote didn't reply with a proper git response - ie, there's a problem on the server running . (The first four bytes should be the line length - instead, they were the characters Unab... probably an error message of some kind.)
真的是手贱为啥要弄个无聊的欢迎信息在bashrc里呢。

评论

此博客中的热门博文

jquery on 的问题

return false  from  within a jQuery event handler  is effectively the same as calling both  e.preventDefault and  e.stopPropagation  on the passed  jQuery.Event object. e.preventDefault()  will prevent the default event from occuring,  e.stopPropagation()  will prevent the evet from bubbling up and  return false  will do both. Note that this behaviour differs from  normal  (non-jQuery) event handlers, in which, notably,  return false   does  not  stop the event from bubbling up . 所以on前半部分的selector必须是静态的。

chrome extension Error: attempting to use a disconnected prot object

if you get this error: Port error: Could not establish connection. Receiving end does not exist. miscellaneous_bindings:236 chromeHidden.Port.dispatchOnDisconnect miscellaneous_bindings:236 Uncaught Error: Attempting to use a disconnected port object miscellaneous_bindings:58 PortImpl.postMessage miscellaneous_bindings:58 responseCallback miscellaneous_bindings:143 xhr.onreadystatechange That means you have make some mistake as this discussed: This is caused when a connection get closed. For example if you open a tab that has the content_script injected, it opens a connection, the tab is closed, and then the background_page tries to pass a message. It will fail because the tab is no longer active to receive the message. In your case I would guess that as tabs close and new tabs open you are attempting to post messages with the old tabId instead of creating a new connection to the new tab. I would recommend reading through the  long-lived connections s

记得很久以前,不知道是在跟谁发感慨,久到好像是上大学时候的事了。我说,我流过很多眼泪,看电影流眼泪,看小说流眼泪,听别人的故事留言了,听歌的时候流眼泪,晚上一个人的时候独自流眼泪。我似乎是一个是一个太不像男人的男人。可是我又说,这些眼泪都是为自己流的。于是我也问对面那个人,(嗯,我也记不起她是谁了): "你为别人流过眼泪么?",居然没有回答我. 也许看见这篇文章的人也不相信,但是我真的想问你一句,你为别人流过眼泪么?真真正正的是为别人的,不是可怜自己,不是觉得别人可怜而让自己也感到了可怜,仅仅是为了别人而悲伤,有过么?如果真的有,我想那也许才是爱吧。 也许您会觉得奇怪,这和爱有什么关系?是啊,流眼泪就是爱么?我们因为悲伤而流泪,流泪是因为,爱别离,求不得,这些的主体是什么?是自己。 我们都是爱自己的,只是99%的人是吧。所以我们流泪了,因为我们的那些种种原因,我们很少会因为别人“求不得,爱别离”而流泪吧。也许说,那又不是自己,对呀,你爱自己,你又不爱她,何苦要为她流这种泪? 我不是一个宽容的人,我也不是一个豁达的人,这是我一生的缺点。我们会为了爱去宽容,我们会因为爱而变的豁达,也许,这是因为我从来都没有真正的爱过谁吧,甚至,连自己。嘿,我现在都开始疑惑,我真的爱过你么,如果是,我为什么都没有宽容和豁达呢?