1 Star 0 Fork 0

huryer / RaspberryPi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0026_git服务器.md 2.14 KB
一键复制 编辑 原始数据 按行查看 历史
zengjf 提交于 2021-03-28 10:54 . git

git服务器

搭建git服务器

关系

  • git:仓库,管理代码迭代版本
    • 技巧主要够用就行
  • GitHub:管理多个仓库,国内访问有时候很慢,或者访问不了
  • gitee:管理多个仓库,和GitHub对等,国内访问快,可作为GitHub访问的桥

Markdown

steps

  • sudo adduser git
  • su git
  • mkdir helloworld.git
  • cd helloworld.git
  • git init --bare
  • git push git@192.168.3.8:helloworld.git 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 ECDSA key sent by the remote host is
      SHA256:jiDc0ov1BuJXDQScqbpLcC5+/z5eNWex1B1oYQfeQGw.
      Please contact your system administrator.
      Add correct host key in /c/Users/Administrator/.ssh/known_hosts to get rid of this message.
      Offending ECDSA key in /c/Users/Administrator/.ssh/known_hosts:2
      ECDSA host key for 192.168.3.8 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 rights
      and the repository exists.
    • ssh-keygen -R 192.168.3.8
  • git clone git@192.168.3.8:helloworld.git
    Cloning into 'helloworld'...
    The authenticity of host '192.168.31.189 (192.168.31.189)' can't be established.
    ECDSA key fingerprint is SHA256:8RCzBU02hBV/GA7E9tJpgvpKRDbauZ1dlfQg9FVmOUs.
    Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
    Warning: Permanently added '192.168.31.189' (ECDSA) to the list of known hosts.
    git@192.168.31.189's password:
    warning: You appear to have cloned an empty repository.
1
https://gitee.com/huryer/RaspberryPi.git
git@gitee.com:huryer/RaspberryPi.git
huryer
RaspberryPi
RaspberryPi
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891