ssh路徑 - Linux

By Michael
at 2011-07-02T08:21
at 2011-07-02T08:21
Table of Contents
※ 引述《cheswe (世事難料)》之銘言:
: 最近在架git server,想用ssh去做存取,
: 請問sshd有辦法設定repository位置嗎??
: 我只知道git-daemon裡面有設定repository位置的功能,
: 舉例來說:
: 當我git-daemon有設定repository為/home/cheswe/
: 使用git: repo init -u git://ip.addr/platform/manifest.git
: 使用ssh: repo init -u ssh://ip.addr/home/cheswe/platform/manifest.git
: 請問有辦法做到像git-daemon一樣嗎??
: 謝謝
我不太確定 repo init 的用法, 自己沒在用
不過我想你用 [email protected]:platform/manifest.git 應該就可以了
(當然如果你 client 端的使用者一致的話可以省略 @ 前面)
比較有趣的狀況是, 如果你不想以家目錄當作相對位置的基準
用 SSH 協定存取的話, 就要改 SSH 的設定
其實改法也很簡單, 就是改該使用者的預設登入路徑而已
$ usermod -d /new/initial/login/path username
不過這樣會影響到所有的 shell 就是了... :Q
--
╱ ̄ ̄ ̄╲
▏◢█◣ ▏
︻█︻█ ▏ 成龍表示: 是喔...
′/ ‵ ▏
╰╯ █╱
ψQSWEET ◥︶█◤
--
: 最近在架git server,想用ssh去做存取,
: 請問sshd有辦法設定repository位置嗎??
: 我只知道git-daemon裡面有設定repository位置的功能,
: 舉例來說:
: 當我git-daemon有設定repository為/home/cheswe/
: 使用git: repo init -u git://ip.addr/platform/manifest.git
: 使用ssh: repo init -u ssh://ip.addr/home/cheswe/platform/manifest.git
: 請問有辦法做到像git-daemon一樣嗎??
: 謝謝
我不太確定 repo init 的用法, 自己沒在用
不過我想你用 [email protected]:platform/manifest.git 應該就可以了
(當然如果你 client 端的使用者一致的話可以省略 @ 前面)
比較有趣的狀況是, 如果你不想以家目錄當作相對位置的基準
用 SSH 協定存取的話, 就要改 SSH 的設定
其實改法也很簡單, 就是改該使用者的預設登入路徑而已
$ usermod -d /new/initial/login/path username
不過這樣會影響到所有的 shell 就是了... :Q
--
╱ ̄ ̄ ̄╲
▏◢█◣ ▏
︻█︻█ ▏ 成龍表示: 是喔...
′/ ‵ ▏
╰╯ █╱
ψQSWEET ◥︶█◤
--
Tags:
Linux
All Comments

By Enid
at 2011-07-05T10:08
at 2011-07-05T10:08
Related Posts
glc下載,尚待解決

By Ophelia
at 2011-07-01T20:52
at 2011-07-01T20:52
PCManX GTK+ 2011 系統圖示票選活動

By Linda
at 2011-07-01T15:41
at 2011-07-01T15:41
Samba在windows底下看不到檔案

By Mary
at 2011-07-01T02:20
at 2011-07-01T02:20
lazyscript ubuntu 11.04

By Ingrid
at 2011-06-30T23:27
at 2011-06-30T23:27
老筆電安裝作業系統遇到問題

By Thomas
at 2011-06-30T22:12
at 2011-06-30T22:12