为Git over SSH设置新的远程存储库
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了为Git over SSH设置新的远程存储库相关的知识,希望对你有一定的参考价值。
Server Side $ ssh server.com Last login: Thu Oct 1 10:32:15 2009 from 0.0.0.0 $ mkdir /opt/git/project.git $ cd /opt/git/project.git $ git --bare init Initialized empty Git repository in /opt/git/project.git $ exit logout Connection to server.com closed. Client Side - Project needs to be an existing local repository. See below how to create a local repository. $ cd ~/git/project $ cd project $ git remote add origin ssh://server.com/opt/git/project.git $ git push origin master Creating a local repository: $ cd ~/git $ mkdir project $ cd project $ git init Initialized empty Git repository in /Users/user/git/project/.git/
以上是关于为Git over SSH设置新的远程存储库的主要内容,如果未能解决你的问题,请参考以下文章
如何让 git 默认为 ssh 而不是 https 对于新的存储库