ubuntu14.04中从服务器下代码出错如下:

yingc@yingc:/media/sf_yingc/work/gitcode/androidtv$ repo sync box
The authenticity of host '[git.nationalchip.com]:29418 ([218.75.120.99]:29418)' can't be established.
RSA key fingerprint is 05:61:57:37:8c:7a:59:35:9e:9c:f0:d8:93:bf:d6:ea.
Are you sure you want to continue connecting (yes/no)? The authenticity of host '[git.nationalchip.com]:29418 ([218.75.120.99]:29418)' can't be established.
RSA key fingerprint is 05:61:57:37:8c:7a:59:35:9e:9c:f0:d8:93:bf:d6:ea.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[git.nationalchip.com]:29418,[218.75.120.99]:29418' (RSA) to the list of known hosts.

Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

之后我将git升级并repo init -b 到指定分支就好了。(mac下按照该方法还是不能下载代码-》mac下没有upgrade这一步)

具体原因尚不清楚

yingc@yingc:/media/sf_yingc/work/gitcode/androidtv$ git --version
git version 1.9.1
yingc@yingc:/media/sf_yingc/work/gitcode/androidtv$ sudo apt-get upgrade git
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
正在对升级进行计算... 完成
git 已经是最新的版本了。
下列软件包的版本将保持不变:
linux-generic-lts-wily linux-headers-generic-lts-wily
linux-image-generic-lts-wily
下列软件包将被升级:
bind9-host ca-certificates cpio dnsutils firefox glib-networking
glib-networking-common glib-networking-services ifupdown libbind9-90
libdns100 libgnutls-openssl27 libgnutls26 libgraphite2-3 libisc95 libisccc90
libisccfg90 libjasper1 liblwres90 libnss3 libnss3-1d libnss3-nssdb libnuma1
liboxideqt-qmlplugin liboxideqtcore0 liboxideqtquick0 libperl5.18
libpixman-1-0 libsmbclient libssh-4 libssl1.0.0 libwbclient0 linux-libc-dev
openssl oxideqt-codecs perl perl-base perl-modules pm-utils python-samba
samba-common samba-common-bin samba-libs smbclient usbutils
升级了 45 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 3 个软件包未被升级。
需要下载 71.9 MB/89.3 MB 的软件包。
解压缩后会消耗掉 4,016 kB 的额外空间。
您希望继续执行吗? [Y/n] y

git代码仓库迁移(从github到oschina)

我的代码迁移相关命令(从github到coding):

  559  git clone https://github.com/jingzhishen/thirdparty.git
560 ls
561 cd thirdparty/
562 l
563 ls
564 git log
565 ls
566 cd ..
567 ls
568 cp thirdparty/ thirdparty.bak -rf
569 ls
570 cd thirdparty
571 ls
572 git br
573 git remote set-url origin https://git.coding.net/jingzhishen/thirdparty.git
574 git add .
575 git st
576 git log
577 ls
578 git st
579 git ci -a -m "migrate commit."
580 git push -u origin master
581 git pull

git 撤销commit

方法:

git reset --hard <commit_id>

git push origin HEAD --force

Git Stash用法

aa

git使用中的一些问题的更多相关文章

  1. git使用中遇到的常见问题

    .gitignore 中添加的文件不能被忽略掉 这是因为我们误解了 .gitignore 文件的用途,该文件只能作用于 Untracked Files,也就是那些从来没有被 Git 记录过的文件(自添 ...

  2. git使用中checkout生成临时br的问题(吓出一身冷汗啊)

    git中几天前漫不经心的使用了git checkout ver_hash的命令,结果push到远程库都提示everything is up-to-date,实际神马都没提交上去啊!但看本地log中的确 ...

  3. Android中 Git 使用中几个概念

    1.仓库(版本库) 版本库又名仓库,英文名repository,你可以简单理解成一个目录,这个目录里面的所有文件都可以被Git管理起来,每个文件的修改.删除,Git都能跟踪,以便任何时刻都可以追踪历史 ...

  4. git使用中出现的错误

    因同时有两个git账户,之前登录了git A 用户在使用了 1.       长期存储密码 git config --global credential.helper store 之后在git B 账 ...

  5. Git 使用中显示“Another git process seems to be running in this repository...”问题解决

    一.引言:问题回忆 这几天,我同时在使用vs2017自带的git管理工具和git bash命令行工具对于同一个工作区进行了git操作管理. 其中,当我在vs2017中对文件进行了更改,突然脑洞大开,想 ...

  6. 【ASK】git使用中出现Permission denied (publickey).

    好久没有用git了,今天突然执行了一下 $git submodule update --init --recursive =============================== 结果出现如下提 ...

  7. git使用中的一些命令及心得

    Git 与 SVN 区别点: 1.Git 是分布式的,SVN 不是:这是 Git 和其它非分布式的版本控制系统,例如 SVN,CVS 等,最核心 的区别. 2.Git 把内容按元数据方式存储,而 SV ...

  8. Git 使用中遇见的各种问题及解决办法

    一.修改提交代码的用户名以及提交邮箱,(推荐使用方法2,一劳永逸) 方法1(修改.git/config文件): step1:进入工程.git文件夹 step2:vim config step3:末行添 ...

  9. git使用中的问题

    一.github ssh_exchange_identification: read: Connection reset by peer 和电脑环境有关,检查防火墙关了没有,是不是杀毒软件.安全卫士的 ...

随机推荐

  1. 洛谷——P3908 异或之和

    P3908 异或之和 题目描述 求1 \bigoplus 2 \bigoplus\cdots\bigoplus N1⨁2⨁⋯⨁N 的值. A \bigoplus BA⨁B 即AA , BB 按位异或. ...

  2. AtCoder - 3954 Painting Machines

    题面在这里! 题解见注释 /* 考虑一个可以用 K ((n+1)/2 <= K < n)次染黑的方案, 那么将操作前K次的机器从小到大排序,一定是: a1=1 < a2 < . ...

  3. BZOJ 2073 [POI2004]PRZ(状压DP)

    [题目链接] http://www.lydsy.com/JudgeOnline/problem.php?id=2073 [题目大意] 任何时候队伍在桥上的人都不能超过一定的限制. 所以这只队伍过桥时只 ...

  4. 【高斯消元】BZOJ1013-[JSOI2008]球形空间产生器sphere

    [题目大意] 给出n维空间中给出n+1个点的坐标,求出球心坐标. [思路] 令球心坐标为x1,x2...xn,假设当前第i个点坐标为a1,a2...,an,第i+1个点坐标为b1,b2...,bn,则 ...

  5. win8 wamp 安装报错

    可是安装wamp的时候(http://www.wampserver.com/en/#download-wrapper)下载的是64位的,刚开始报 错xxx.dll文件丢失,好吧我把那个xxx.dll文 ...

  6. idea小问题解决方法系列

    1)有些java文件上显示“红色小j”,如图所示 ,意思是“不可编译”,原因是Module未导入或者没有标记Module下"Sources"一栏src文件夹为Sources.(ht ...

  7. [转]tx:advice标签简介

    <Spring高级程序设计>第16章事务管理,通过本章的学习,你知道了如何使用Spring去管理事务,而这种方式几乎不会对你的源代码产生任何影响.你现在知道了如何使用本地和全局事务,并知道 ...

  8. HDU 4632 Palindrome subsequence (2013多校4 1001 DP)

    Palindrome subsequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65535 K (Java/ ...

  9. GridControl事件

    private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventA ...

  10. 为DbContextScope添加数据库事务提交完成事件

    使用EF开发应用程序的一个难点就在于对其DbContext的生命周期管理,你的管理策略是否能很好的支持上层服务 使用独立事务,使用嵌套事务,并行执行,异步执行等需求? Mehdi El Gueddar ...