前言

  • fatal: unable to access
    'https://github.com/zhangkn/cy...': SSL certificate
    problem: unable to get local issuer certificate
  • There is no tracking information for the current branch.

There is no tracking information for the current branch.

今天git pull发现了 以下问题

There is no tracking information for the current branch.
Please specify which branch you want to merge with.

因为本地分支和远程分支没有建立联系 (使用git branch -vv 可以查看本地分支和远程分支的关联关系) .

See git-pull(1) for details.git pull <remote> <branch>If you wish to set tracking information for this branch you can do so with:git branch --set-upstream-to=origin/<branch> developdevzkndeMacBook-Pro:guangyouqian devzkn$ git branch -vv
* develop b7e5c40 Merge remote-tracking branch 'origin/develop' into developmaster  5128d9e [origin/master] Merge branch 'develop'

根据命令行提示只需要执行以下命令即可
git branch --set-upstream-to=origin/远程分支的名字 本地分支的名字

See git-pull(1) for details.

devzkndeMacBook-Pro:guangyouqian devzkn$ git pull origin develop
From gitlab.v6h5.cn:guangyouqian/guangyouqian* branch            develop    -> FETCH_HEAD
Updating b7e5c40..798cbc5
Checking out files: 100% (329/329), done.
Fast-forward

-p 选项展开显示每次提交的内容差异,用 -2 则仅显示最近的两次更新:

devzkndeMacBook-Pro:guangyouqian devzkn$ git log -p -2

解决方案

指定当前工作目录工作分支,跟远程的仓库,分支之间的链接关系。

在此之前,我们必须要指定想要push或者pull的远程分支。

devzkndeMacBook-Pro:guangyouqian devzkn$ git pull origin develop
devzkndeMacBook-Pro:guangyouqian devzkn$ git branch --set-upstream-to=origin/develop develop
Branch develop set up to track remote branch develop from origin.

fatal: unable to access 'https://github.com/zhangkn/cy...': SSL certificate problem: unable to get local issuer certificate

  • To disable TLS/SSL verification for a single git command

try passing -c to git with the proper config variable, or use Flow's answer:

git -c http.sslVerify=false clone https://example.com/path/to/git
To disable SSL verification for a specific repository

示例:

iPhone:~ root#  git -c http.sslVerify=false clone https://github.com/zhangkn/cycript-utils.git /usr/lib/cycript0.9/com/tyilo
Cloning into '/usr/lib/cycript0.9/com/tyilo'...
remote: Counting objects: 46, done.
remote: Total 46 (delta 0), reused 0 (delta 0), pack-reused 46
Unpacking objects: 100% (46/46), done.
Checking connectivity... done.
  • Disabling TLS(/SSL) certificate verification globally is a terribly
    insecure practice. Don't do it. Do not issue the above command with a
    --global modifier.

If the repository is completely under your control, you can try:

`git config http.sslVerify false
`

  • There are quite a few SSL configuration options in git. From the man
    page of git config:
http.sslVerifyWhether to verify the SSL certificate when fetching or pushing over HTTPS.Can be overridden by the GIT_SSL_NO_VERIFY environment variable.http.sslCAInfoFile containing the certificates to verify the peer with when fetching or pushingover HTTPS. Can be overridden by the GIT_SSL_CAINFO environment variable.http.sslCAPathPath containing files with the CA certificates to verify the peer with whenfetching or pushing over HTTPS.Can be overridden by the GIT_SSL_CAPATH environment variable.
A few other useful SSL configuration options:http.sslCertFile containing the SSL certificate when fetching or pushing over HTTPS.Can be overridden by the GIT_SSL_CERT environment variable.http.sslKeyFile containing the SSL private key when fetching or pushing over HTTPS.Can be overridden by the GIT_SSL_KEY environment variable.http.sslCertPasswordProtectedEnable git's password prompt for the SSL certificate. Otherwise OpenSSL willprompt the user, possibly many times, if the certificate or private key is encrypted.Can be overridden by the GIT_SSL_CERT_PASSWORD_PROTECTED environment variable.

git 常见问题的解决方案相关推荐

  1. ubuntu下Android开发环境的搭建:eclipse+SDK详细安装教程+常见问题及其解决方案

    先讲具体的安装步骤然后再说常见问题及解决方案. ubuntu下安装eclipse+SDK具体步骤: 1.安装JDK: 在官网(http://www.oracle.com/technetwork/jav ...

  2. OpenStack环境搭建(六:常见问题及解决方案总结)

    实验要求: 完成Virtual box平台安装,会应用相关操作: 在virtual box虚拟平台上部署Fuel Master节点: 在virtual box虚拟平台上部署计算节点Computer: ...

  3. ESXi6.5环境搭建(五:常见问题及解决方案实验总结)

    实验目的及要求 完成VMware workstations安装,会应用相关操作: 完成虚拟机中ESXI6.5平台的安装及网络环境配置: 完成VMware vSphere Client 6.0软件在PC ...

  4. C#中使用WCF一些常见问题及解决方案

    C#中使用WCF一些常见问题及解决方案 参考文章: (1)C#中使用WCF一些常见问题及解决方案 (2)https://www.cnblogs.com/52XF/p/3740326.html 备忘一下 ...

  5. gulp几个常见问题及解决方案

    gulp几个常见问题及解决方案 参考文章: (1)gulp几个常见问题及解决方案 (2)https://www.cnblogs.com/hjson/p/10546708.html 备忘一下.

  6. Mycat常见问题与解决方案

    Mycat常见问题与解决方案 参考文章: (1)Mycat常见问题与解决方案 (2)https://www.cnblogs.com/it-deepinmind/p/11913519.html 备忘一下 ...

  7. [持续更新]UnsatisfiedLinkError常见问题及解决方案

    [持续更新]UnsatisfiedLinkError常见问题及解决方案 参考文章: (1)[持续更新]UnsatisfiedLinkError常见问题及解决方案 (2)https://www.cnbl ...

  8. 为什么焊锡老是粘在烙铁头上_自动焊锡机常见问题及解决方案「由力自动化」...

    随着科技的不断进步,一些行业中机器替代人工是避不可挡的一种发展趋势,自动焊锡机因为所能使用的行业广泛相信很多的朋友都有所了解,那么自动焊锡机器人使用时常见问题有哪些呢,该如何解决呢?下面小编来简单的讲 ...

  9. ARKit从入门到精通(11)-ARKit开发常见问题及解决方案

    转载请注明出处:ARKit从入门到精通(11)-ARKit开发常见问题及解决方案 本文主要介绍ARKit开发过程中一些常见问题 1.ARKit框架无法导入问题 2.ARKit运行黑屏或者白屏问题:Un ...

最新文章

  1. 火热的激情、严密的计划成就双冠梦想——我的项管经验(转载)
  2. 博途v15安装过程中提示出错_博途V15.1安装及无限重启和.net3.5SP1错误处理解决方法...
  3. centos查看模块信息和模块路径
  4. python字典和集合双向索引_Python-为什么字典和集合中的顺序是任意的?
  5. MongoDB学习笔记~以匿名对象做为查询参数,方便查询子对象
  6. 【易语言】贴吧工具源码 以前写的
  7. QWidget *parent
  8. javascript动态改变窗口大小
  9. Oracle 中 start with 递归查询、case when 条件表达式、rowid 伪列去重
  10. NVIDIA Nsight Systems 入门及使用
  11. 设计一个简单的家乡网站
  12. navicat 注册过程
  13. 【layUI时间控件使用】:按钮显示时间并放到输入框
  14. 网络营销4p营销策略
  15. 老徐和阿珍的故事:ArrayList和LinkedList的效率到底哪个高?
  16. 划片机是芯片切割制造流程中一个重要的环节
  17. RGB颜色转换16进制
  18. 25. Green Living 绿色生活
  19. 让人傻傻分不清的TDD、ATDD、BDD
  20. Kotlin上的反应式流-SharedFlow和StateFlow

热门文章

  1. UIAlert的使用
  2. python 调用mysql存储过程返回结果集
  3. linux的定制和发布(二)
  4. windows 7 64bit 下apache php mysql 环境配置
  5. 转载:28个Unix/Linux的命令行神器
  6. SharePoint2010添加webpart找不到内容编辑器
  7. JMETER分布式原理
  8. 08-04 性能测试--复杂情景设计
  9. catia曲面设计从入门到精通_CATIA V5 曲面设计从入门到精通
  10. 电脑应用程序错误怎么办_遇到电脑桌面应用程序无法正常启动(0xc0000142)怎么办?0xc0000142解决方法...