笔记项目随身携带-android手机git服务器:gidder

来源:互联网 发布:淘宝魔盒 格式 编辑:程序博客网 时间:2024/05/02 03:05

笔记项目随身携带-android手机git服务器:gidder

一、gidder概述

推荐一款开源的在Android平台上的git服务器app:gidder。它可以将手机作为可移动的git服务器。感谢Bob的推荐,在这里推荐给大家使用。

因为公司网络限制,evernote、为知笔记、有道笔记都上不了,github在国内网络状况不佳,所以找到这样一个工具,将自己的android手机变成一个移动的git服务器,每天下班前将公司记的笔记同步到自己的手机上,回家了再同步到私人电脑上,反之亦然。

这样我们就可以随身携带git服务器管理笔记或者文件。使用这种方式不仅可以不依赖互联网,而且还可以看到到自己笔记每一笔提交,随时回退修改,方便很多。只可惜现在只有Android平台上能勾使用。

二、gidder使用方式

1.apk获取方式

1.1 gidder源码:https://github.com/antoniy/Gidder

下载该源码,编译生成apk,这样我们可以修改代码,加入或者修改我们想要的功能;

1.2 goolge play上下载

https://play.google.com/store/apps/details?id=net.antoniy.gidder.beta
国内的应用市场貌似没搜到;

1.3 百度云:

https://pan.baidu.com/s/1eRWFxRk

2.apk使用方式

请参考:http://devzc.com/archives/302/giddergit-server-on-android/
注意有的手机可能默认没有给该apk读写sdcard的权限,以致建不了仓,或有仓名却git clone找不到仓,需要手动给于apk sdcard读写权限,在settings里找设置的地方;

三、小事情解决方法

按照以上的操作基本上可以成功使用了。但可能会遇到些小事情。

1. win7 push出错

出错log如下:

$ git push origin masterUnable to negotiate with 10.0.56.163 port 2222: no matching host key type found. Their offer: ssh-dssfatal: Could not read from remote repository.

解决方法:
参考:http://stackoverflow.com/questions/34208495/unable-to-negotiate-with-xx-xxx-xx-xx-no-matching-host-key-type-found-their-of

I have found the problem , The new OpenSSH versions disable the ssh-dss (DSA) public key algorithm. DSA was deemed too weak and OpenSSH community recommends against its use.If you see an error similar to this:Unable to negotiate with 10.96.8.72: no matching host key type found. Their offer: ssh-dss...then you must re-enable the DSA keys by editing your ~/.ssh/config file to add the following line:HostkeyAlgorithms +ssh-dssYou may need to create the ~/.ssh/config file if it does not already exist.After creating the file, you must restrict access permissions:chmod 600 ~/.ssh/configand then do the clone. That should work perfectly fine!

2. 由于ip经常更换,push出错

2.1 修改每次不同的url:

git remote set-url origin ssh://cdg@10.0.56.24:2222/mynotes.git

2.2 出错log

$ git push cdgnote master@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!Someone could be eavesdropping on you right now (man-in-the-middle attack)!It is also possible that a host key has just been changed.The fingerprint for the DSA key sent by the remote host isSHA256:MhOGEr5Oj3N9MoMM4DcHsNSfMKZk2bSEhGSsvFWUYco.Please contact your system administrator.Add correct host key in /c/Users/ni**.chen/.ssh/known_hosts to get rid of this message.Offending DSA key in /c/Users/ni**.chen/.ssh/known_hosts:4DSA host key for [10.0.56.201]:2222 has changed and you have requested strict checking.Host key verification failed.fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.

解决方法:删除known_host中对应url的条目,再push。

四、总结

这样的使用方式很独立,不依赖互联网,随身携带,安全性高,再也不用担心公司网络限制了。
日后再有使用心得再续上。

0 0
原创粉丝点击