-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmy-super-git.html
More file actions
98 lines (90 loc) · 3.48 KB
/
my-super-git.html
File metadata and controls
98 lines (90 loc) · 3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>LifeDebuger stuff | Hot to setup remote git server</title>
<link rel="shortcut icon" type="image/png" href="/favicon.png">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<link href="/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="LifeDebuger stuff Full RSS Feed" />
<link href="/feeds/git.rss.xml" type="application/rss+xml" rel="alternate" title="LifeDebuger stuff Categories RSS Feed" />
<link rel="stylesheet" href="/theme/css/screen.css" type="text/css" />
<link rel="stylesheet" href="/theme/css/pygments.css" type="text/css" />
<link rel="stylesheet" href="/theme/css/print.css" type="text/css" media="print" />
<meta name="generator" content="Pelican" />
<meta name="keywords" content="git,ssh" />
</head>
<body>
<header>
<nav>
<ul>
<li><a href="">Home</a></li>
</ul>
</nav>
<div class="header_box">
<h1><a href="">LifeDebuger stuff</a></h1>
</div>
</header>
<div id="wrapper">
<div id="content"> <h4 class="date">бер 28, 2017</h4>
<article class="post">
<h2 class="title">
<a href="/my-super-git.html" rel="bookmark" title="Permanent Link to "Hot to setup remote git server"">Hot to setup remote git server</a>
</h2>
<div class="section" id="id1">
<h2>Hot to setup remote git server ?</h2>
<ol class="arabic simple">
<li>Get/Generate custom ssh keys.</li>
<li>Add information about cutom host ssh keys to ~/.ssh/config file:</li>
</ol>
<pre class="code sss_config_file_lang literal-block">
host xxx.xxx.xxx.xxx
HostName xxx.xxx.xxx.xxx
IdentityFile ~/.ssh/XXX
User user
</pre>
<ol class="arabic simple" start="3">
<li>At server side create repo:</li>
</ol>
<pre class="code bash literal-block">
<span class="pygments-nb">cd</span> /
mkdir -p /opt/git/repo.git
<span class="pygments-nb">cd</span> /opt/git/repo.git
git init --bare
</pre>
<ol class="arabic simple" start="4">
<li>At client side make repo:</li>
</ol>
<pre class="code bash literal-block">
<span class="pygments-nb">cd</span> /
mkdir -p ~/repo
<span class="pygments-nb">cd</span> ~/repo
<span class="pygments-nb">echo</span> <span class="pygments-s2">"testdata"</span> > testfile.txt
git add testfile.txt
git commmit -m <span class="pygments-s2">"initial commit"</span>
git remote add origing ssh://user@xxx.xxx.xxx.xxx:host_port/opt/git/repo.git
git push origing master
</pre>
</div>
<div class="clear"></div>
<div class="info">
<a href="/my-super-git.html">posted at 15:20</a>
· <a href="/category/git.html" rel="tag">git</a>
·
<a href="/tag/git.html" class="tags">git</a>
<a href="/tag/ssh.html" class="tags">ssh</a>
</div>
</article>
<div class="clear"></div>
<footer>
<p>
<a href="https://github.com/jody-frankowski/blue-penguin">Blue Penguin</a> Theme
·
Powered by <a href="http://getpelican.com">Pelican</a>
·
<a href="/feeds/all.rss.xml" rel="alternate">Rss Feed</a>
</footer>
</div>
<div class="clear"></div>
</div>
</body>
</html>