Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
a1fff682
Commit
a1fff682
authored
Nov 12, 2011
by
lukasberns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for custom SSH ports
parent
6f915d5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
app/models/repository.rb
app/models/repository.rb
+5
-1
config/gitosis.yml
config/gitosis.yml
+1
-0
No files found.
app/models/repository.rb
View file @
a1fff682
...
...
@@ -22,7 +22,11 @@ class Repository
end
def
url_to_repo
"
#{
GITOSIS
[
"git_user"
]
}
@
#{
GITOSIS
[
"host"
]
}
:
#{
path
}
.git"
if
!
GITOSIS
[
"port"
]
or
GITOSIS
[
"port"
]
==
22
"
#{
GITOSIS
[
"git_user"
]
}
@
#{
GITOSIS
[
"host"
]
}
:
#{
path
}
.git"
else
"ssh://
#{
GITOSIS
[
"git_user"
]
}
@
#{
GITOSIS
[
"host"
]
}
:
#{
GITOSIS
[
"port"
]
}
/
#{
path
}
.git"
end
end
def
path_to_repo
...
...
config/gitosis.yml
View file @
a1fff682
...
...
@@ -2,3 +2,4 @@ admin_uri: git@localhost:gitosis-admin.git
base_path
:
/home/git/repositories/
host
:
localhost
git_user
:
git
# port: 22
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment