Commit aa50408e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

1. Better message if no ssh key

2. SSH Keys Help page
parent 5c7ed6fa
......@@ -735,3 +735,11 @@ li.note {
font-size: 12px;
}
}
.error_message {
@extend .cred;
border-bottom: 1px solid #D21;
padding-bottom:20px;
text-align:center;
margin-bottom:10px;
}
......@@ -4,6 +4,11 @@ body {
pre {
font-family:'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono','lucida console',monospace;
&.dark {
background: #333;
color:#f5f5f5;
}
}
a {
......
- if @projects.any?
.projects
.activities.span8
- if current_user.require_ssh_key?
.alert.alert-error.padded
%span
You wont be able to pull/push project code unless you
%strong
= link_to new_key_path, class: "vlink" do
add new key
to your profile
= render 'shared/no_ssh'
- if @events.any?
.content_list= render @events
- else
......@@ -57,5 +50,5 @@
If you will be added to project - it will be displayed here
:javascript
:javascript
$(function(){ Pager.init(20); });
......@@ -31,3 +31,6 @@
%li
%h5= link_to "Gitlab Markdown", help_markdown_path
%li
%h5= link_to "SSH keys", help_ssh_path
%h3 Permissions
%h3.page_title Permissions
.back_link
= link_to help_path do
= link_to help_path do
← to index
%hr
......
%h3.page_title SSH Keys
.back_link
= link_to help_path do
← to index
%hr
%p.slead
SSH key allows you to establish a secure connection between your computer and Gitlab
%p.slead
To generate a new SSH key just open your terminal and use code below.
%pre.dark
ssh-keygen -t rsa -C "#{current_user.email}"
\# Creates a new ssh key using the provided email
\# Generating public/private rsa key pair...
%p.slead
Next just use code below to dump your public key and add to GITLAB SSH Keys
%pre.dark
cat ~/.ssh/id_rsa.pub
\# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc....
%h3 System hooks
.back_link
= link_to :back do
= link_to :back do
← back
%hr
%p.slead
%p.slead
Your Gitlab instance can perform HTTP POST request on next event: create_project, delete_project, create_user, delete_user, change_team_member.
%br
System Hooks can be used for logging or change information in LDAP server.
......
%h3 Web hooks
%h3.page_title Web hooks
.back_link
= link_to help_path do
= link_to help_path do
← to index
%hr
%p.slead
Every Gitlab project can trigger a web server whenever the repo is pushed to.
%p.slead
Every Gitlab project can trigger a web server whenever the repo is pushed to.
%br
Web Hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.
%br
......
- bash_lexer = Pygments::Lexer[:bash]
%h3 Workflow
%h3.page_title Workflow
.back_link
= link_to help_path do
= link_to help_path do
← to index
%hr
......@@ -9,25 +8,25 @@
%li
%p Clone project
.bash
%pre
%pre.dark
git clone git@example.com:project-name.git
%li
%p Create branch with your feature
.bash
%pre
%pre.dark
git checkout -b $feature_name
%li
%p Write code. Commit changes
.bash
%pre
%pre.dark
git commit -am "My feature is ready"
%li
%p Push your branch to gitlabhq
.bash
%pre
%pre.dark
git push origin $feature_name
%li
......
......@@ -11,7 +11,13 @@
.input= f.text_field :title
.clearfix
= f.label :key
.input= f.text_area :key, class: [:xxlarge, :thin_area]
.input
= f.text_area :key, class: [:xxlarge, :thin_area]
%p.hint
Paste your public key here. Read more about how generate it
= link_to "here", help_ssh_path
.actions
= f.submit 'Save', class: "primary btn"
= link_to "Cancel", keys_path, class: "btn"
......
%h3.page_title New key
%h3.page_title Add an SSH Key
%hr
= render 'form'
......
......@@ -3,13 +3,12 @@
%a.close{href: "#"} ×
%h3 How To Merge
.modal-body
%pre
%pre.dark
= preserve do
:erb
git checkout <%= @merge_request.target_branch %>
git fetch origin
git merge origin/<%= @merge_request.source_branch %>
git push origin <%= @merge_request.target_branch %>
git checkout #{@merge_request.target_branch}
git fetch origin
git merge origin/#{@merge_request.source_branch}
git push origin #{@merge_request.target_branch}
:javascript
......
- if current_user.require_ssh_key?
.alert-message.block-message.error
%ul
%li You have no ssh keys added to your profile.
%li You wont be able to pull/push repository.
%li Visit profile &rarr; keys and add public key of every machine you want to use for work with gitlabhq.
.alert-message.block-message.error
%ul.unstyled.alert_holder
%li You should push repository to proceed.
%li After push you will be able to browse code, commits etc.
- bash_lexer = Pygments::Lexer[:bash]
= render 'shared/no_ssh'
%div.git-empty
%h3 Git global setup:
- setup_str = ["git config --global user.name \"#{current_user.name}\"",
"git config --global user.email \"#{current_user.email}\""].join("\n")
= preserve do
= raw bash_lexer.highlight(setup_str, lexer: 'bash', options: {encoding: 'utf-8'})
%br
%br
%h3 Create Repository
- repo_setup_str = ["mkdir #{@project.path}",
"cd #{@project.path}",
"git init",
"touch README",
"git add README",
"git commit -m 'first commit'",
"git remote add origin #{@project.url_to_repo}",
"git push -u origin master"].join("\n")
%h4 Git global setup:
%pre.dark
= preserve do
git config --global user.name "#{current_user.name}"
git config --global user.email "#{current_user.email}"
= preserve do
= raw bash_lexer.highlight(repo_setup_str)
%h4.prepend-top-20 Create Repository
%pre.dark
= preserve do
mkdir #{@project.path}
cd #{@project.path}
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin #{@project.url_to_repo}
git push -u origin master
%br
%br
%h3 Existing Git Repo?
- exist_repo_setup_str = ["cd existing_git_repo",
"git remote add origin #{@project.url_to_repo}",
"git push -u origin master"].join("\n")
= preserve do
= raw bash_lexer.highlight(exist_repo_setup_str)
%h4.prepend-top-20 Existing Git Repo?
%pre.dark
= preserve do
cd existing_git_repo
git remote add origin #{@project.url_to_repo}
git push -u origin master
- if can? current_user, :admin_project, @project
.alert-message.block-message.error.prepend-top-20
= link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger"
.prepend-top-20
= link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger right"
- if current_user.require_ssh_key?
%h6.error_message
%span
You wont be able to pull/push project code unless you
%strong
= link_to new_key_path, class: "vlink" do
add SSH key
to your profile
......@@ -30,6 +30,7 @@ Gitlab::Application.routes.draw do
get 'help/web_hooks' => 'help#web_hooks'
get 'help/system_hooks' => 'help#system_hooks'
get 'help/markdown' => 'help#markdown'
get 'help/ssh' => 'help#ssh'
#
# Admin Area
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment