换设备后ssh报错

问题描述:运行ssh报如下错误
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
23:00:20:83:de:02:95:f1:e3:34:be:57:3f:cf:2c:e7.
Please contact your system administrator.
Add correct host key in /home/xahria/.ssh/known_hosts to get rid of this message.
Offending key in /home/xahria/.ssh/known_hosts:8
RSA host key for localhost has changed and you have requested strict checking.
Host key verification failed.

问题分析:估计是RSA key不匹配

问题解决:修改安全配置
打开.ssh/config(或者/etc/ssh/ssh_config)
找到并修改为:
StrictHostKeyChecking no
UserKnownHostsFile /dev/null

brew update报错

问题描述:运行brew update,报错
error: The following untracked working tree files would be overwritten by merge:
Library/Aliases/libtcnative
Library/Aliases/myrepos
Library/Contributions/example-formula.rb
Library/Formula/acme.rb
Library/Formula/activemq-cpp.rb
Library/Formula/ahcpd.rb
Library/Formula/analog.rb
Library/Formula/ansible.rb
Library/Formula/apple-gcc42.rb
Library/Formula/argus-clients.rb
Library/Formula/argus.rb
Library/Formula/babeld.rb
Library/Formula/bacula-fd.rb
Library/Formula/bgpq3.rb
Library/Formula/bitchx.rb
Library/Formula/brag.rb
Library/Formula/cdlabelgen.rb
Library/Formula/charm-tools.rb
Library/Formula/clipper.rb
Library/Formula/clojurescript.rb
Library/Formula/datomic.rb
Library/Formula/dieharder.rb
Library/Formula/dmalloc.rb
Library/Formula/dtrx.rb
Library/Formula/ejdb.rb
Library/Formula/electric-fence.rb
Library/Formula/etcd.rb
Library/Formula/etcdctl.rb
Library/Formula/fdclone.rb
Library/Formula/flowgrind.rb
Library/Formula/fswatch.rb
Library/Formula/gammu.rb
Library/Formula/gcab.rb
Library/Formula/git-cal.rb
Library/Formula/gtkspell3.rb
Library/Formula/hamsterdb.rb
Library/Formula/haxe.rb
Library/Formula/headphones.rb
Library/Formula/htmlcleaner.rb
Library/Formula/irrtoolset.rb
Library/Formula/juju.rb
Library/Formula/kimwitu++.rb
Library/Formula/kstart.rb
Library/Formula/laszip.rb
Library/Formula/libatomic_ops.rb
Library/Formula/libav.rb
Library/Formula/libcello.rb
Library/Formula/libcppa.rb
Library/Formula/libdrawtext.rb
Library/Formula/libftdi0.rb
Library/Formula/libgsm.rb
Library/Formula/libiscsi.rb
Library/Formula/liblacewing.rb
Library/Formula/libnatpmp.rb
Library/Formula/libqxt.rb
Library/Formula/libresample.rb
Library/Formula/lmdb.rb
Library/Formula/mbelib.rb
Library/Formula/mboxgrep.rb
Library/Formula/mecab-unidic.rb
Library/Formula/mergelog.rb
Library/Formula/midicsv.rb
Library/Formula/mitmproxy.rb
Library/Formula/mkvtomp4.rb
Library/Formula/mlt.rb
Library/Formula/mm-common.rb
Library/Formula/moc.rb
Library/Formula/mongo-c.rb
Library/Formula/monkeysphere.rb
Library/Formula/mp3blaster.rb
Library/Formula/msitools.rb
Library/Formula/msktutil.rb
Library/Formula/n.rb
Library/Formula/namebench.rb
Library/Formula/nanomsg.rb
Library/Formula/neko.rb
Library/Formula/ninja-ide.rb
Library/Formula/npth.rb
Library/Formula/ondir.rb
Library/Formula/ori.rb
Library/Formula/osxfuse.rb
Library/Formula/owamp.rb
Library/Formula/pgrouting.rb
Library/Formula/pjsip.rb
Library/Formula/pktanon.rb
Library/Formula/pmccabe.rb
Library/Formula/polygen.rb
Library/Formula/ponysay.rb
Library/Formula/proftpd.rb
Library/Formula/q.rb
Library/Formula/randomize-lines.rb
Library/Formula/rbenv-readline.rb
Library/Formula/re2.rb
Library/Formula/reaver.rb
Library/Formula/sbuild.rb
Library/Formula/sdl2.rb
Library/Formula/sdl2_image.rb
Library/Formula/sdl2_mixer.rb
Library/Formula/sdl2_net.rb
Library/Formula/sdl2_ttf.rb
Library/Formula/shellinabox.rb
Library/Formula/slimerjs.rb
Library/Formula/snzip.rb
Library/Formula/spim.rb
Library/Formula/sslh.rb
Library/Formula/stlviewer.rb
Library/Formula/strongswan.rb
Library/Formula/sysbench.rb
Library/Formula/tcpsplit.rb
Library/Formula/texapp.rb
Library/Formula/tinyxml.rb
Library/Formula/tlassemble.rb
Library/Formula/tmux-mem-cpu-load.rb
Library/Formula/tomcat-native.rb
Library/Formula/tpp.rb
Library/Formula/tractorgen.rb
Library/Formula/typesafe-activator.rb
Library/Formula/uberftp.rb
Library/Formula/v.rb
Library/Formula/viewglob.rb
Library/Formula/voltdb.rb
Library/Formula/vstr.rb
Library/Formula/watchman.rb
Library/Formula/wimlib.rb
Library/Formula/wy60.rb
Library/Formula/xcproj.rb
Library/Formula/xplot.rb
Library/Formula/z80asm.rb
Library/Formula/z80dasm.rb
Library/Formula/zpython.rb
Library/Homebrew/cxxstdlib.rb
Library/Homebrew/install_renamed.rb
Library/Homebrew/os.rb
Library/Homebrew/resource.rb
Library/Homebrew/software_spec.rb
Please move or remove them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

问题解决
cd `brew --repository`
git reset --hard HEAD
brew update
不行的话试试如下:
cd `brew --repository`
git reset --hard origin/master
brew update