BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
cdcf69d0
Commit
cdcf69d0
authored
Feb 07, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitlab;shell init script
parent
8ae1d812
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
1_settings.rb
config/initializers/1_settings.rb
+1
-1
shell.rake
lib/tasks/gitlab/shell.rake
+32
-0
No files found.
config/initializers/1_settings.rb
View file @
cdcf69d0
...
...
@@ -51,7 +51,7 @@ Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http"
Settings
.
gitlab
[
'email_from'
]
||=
"gitlab@
#{
Settings
.
gitlab
.
host
}
"
Settings
.
gitlab
[
'support_email'
]
||=
Settings
.
gitlab
.
email_from
Settings
.
gitlab
[
'url'
]
||=
Settings
.
send
(
:build_gitlab_url
)
Settings
.
gitlab
[
'user'
]
||=
'git
lab
'
Settings
.
gitlab
[
'user'
]
||=
'git'
Settings
.
gitlab
[
'signup_enabled'
]
||=
false
Settings
[
'gravatar'
]
||=
Settingslogic
.
new
({})
...
...
lib/tasks/gitlab/shell.rake
0 → 100644
View file @
cdcf69d0
namespace
:gitlab
do
namespace
:shell
do
desc
"GITLAB | Setup gitlab-shell"
task
:setup
=>
:environment
do
setup
end
end
def
setup
warn_user_is_not_gitlab
puts
"This will rebuild an authorized_keys file."
puts
"You will lose any data stored in /home/git/.ssh/authorized_keys."
ask_to_continue
puts
""
system
(
"echo '# Managed by gitlab-shell' > /home/git/.ssh/authorized_keys"
)
Key
.
find_each
(
:batch_size
=>
1000
)
do
|
key
|
if
Gitlab
::
Shell
.
new
.
add_key
(
key
.
shell_id
,
key
.
key
)
print
'.'
else
print
'F'
end
end
rescue
Gitlab
::
TaskAbortedByUserError
puts
"Quitting..."
.
red
exit
1
end
end
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