Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
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
nexedi
gitlab-shell
Commits
b262d92e
Commit
b262d92e
authored
Jun 21, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update VCR fixtures
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c3a98b03
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
483 additions
and
359 deletions
+483
-359
README.md
README.md
+9
-0
spec/gitlab_net_spec.rb
spec/gitlab_net_spec.rb
+56
-52
spec/vcr_cassettes/allowed-pull.yml
spec/vcr_cassettes/allowed-pull.yml
+17
-19
spec/vcr_cassettes/allowed-push.yml
spec/vcr_cassettes/allowed-push.yml
+17
-19
spec/vcr_cassettes/broadcast_message-none.yml
spec/vcr_cassettes/broadcast_message-none.yml
+23
-15
spec/vcr_cassettes/broadcast_message-ok.yml
spec/vcr_cassettes/broadcast_message-ok.yml
+22
-14
spec/vcr_cassettes/check-ok.yml
spec/vcr_cassettes/check-ok.yml
+19
-19
spec/vcr_cassettes/discover-ok.yml
spec/vcr_cassettes/discover-ok.yml
+19
-19
spec/vcr_cassettes/http-pull-disabled.yml
spec/vcr_cassettes/http-pull-disabled.yml
+17
-19
spec/vcr_cassettes/http-push-disabled.yml
spec/vcr_cassettes/http-push-disabled.yml
+14
-12
spec/vcr_cassettes/lfs-authenticate-ok.yml
spec/vcr_cassettes/lfs-authenticate-ok.yml
+20
-20
spec/vcr_cassettes/notify-post-receive.yml
spec/vcr_cassettes/notify-post-receive.yml
+11
-9
spec/vcr_cassettes/ssh-key-not-found.yml
spec/vcr_cassettes/ssh-key-not-found.yml
+16
-22
spec/vcr_cassettes/ssh-key-not-implemented.yml
spec/vcr_cassettes/ssh-key-not-implemented.yml
+18
-24
spec/vcr_cassettes/ssh-key-ok.yml
spec/vcr_cassettes/ssh-key-ok.yml
+21
-14
spec/vcr_cassettes/ssh-pull-disabled.yml
spec/vcr_cassettes/ssh-pull-disabled.yml
+20
-20
spec/vcr_cassettes/ssh-pull-project-denied.yml
spec/vcr_cassettes/ssh-pull-project-denied.yml
+14
-12
spec/vcr_cassettes/ssh-push-disabled.yml
spec/vcr_cassettes/ssh-push-disabled.yml
+20
-20
spec/vcr_cassettes/ssh-push-project-denied-with-user.yml
spec/vcr_cassettes/ssh-push-project-denied-with-user.yml
+46
-0
spec/vcr_cassettes/ssh-push-project-denied.yml
spec/vcr_cassettes/ssh-push-project-denied.yml
+46
-0
spec/vcr_cassettes/two-factor-recovery-codes-fail.yml
spec/vcr_cassettes/two-factor-recovery-codes-fail.yml
+19
-15
spec/vcr_cassettes/two-factor-recovery-codes.yml
spec/vcr_cassettes/two-factor-recovery-codes.yml
+19
-15
No files found.
README.md
View file @
b262d92e
...
...
@@ -155,3 +155,12 @@ Rails application:
3.
Update
`GITLAB_SHELL_VERSION`
in the Rails application to the
**
raw
version
**
. (Note: this can be done as a separate MR to that, or in and MR
that will make use of the latest GitLab Shell changes.)
## Updating VCR fixtures
In order to generate new VCR fixtures you need to have a local GitLab instance
running and have next data:
1.
gitlab-org/gitlab-test project.
2.
SSH key with access to the project and ID 1 that belongs to Administrator.
3.
SSH key without access to the project and ID 2.
spec/gitlab_net_spec.rb
View file @
b262d92e
...
...
@@ -6,11 +6,14 @@ require_relative '../lib/gitlab_access_status'
describe
GitlabNet
,
vcr:
true
do
let
(
:gitlab_net
)
{
GitlabNet
.
new
}
let
(
:changes
)
{
[
'0000000000000000000000000000000000000000 92d0970eefd7acb6d548878925ce2208cfe2d2ec refs/heads/branch4'
]
}
let
(
:host
)
{
'https://dev.gitlab.org/api/v4/internal'
}
let
(
:host
)
{
'http://localhost:3000/api/v4/internal'
}
let
(
:project
)
{
'gitlab-org/gitlab-test.git'
}
let
(
:key
)
{
'key-1'
}
let
(
:key2
)
{
'key-2'
}
let
(
:secret
)
{
gitlab_net
.
send
(
:secret_token
)
}
before
do
gitlab_net
.
stub
(
:host
).
and_return
(
host
)
gitlab_net
.
stub
(
:secret_token
).
and_return
(
'a123'
)
end
describe
:check
do
...
...
@@ -23,7 +26,7 @@ describe GitlabNet, vcr: true do
it
'adds the secret_token to request'
do
VCR
.
use_cassette
(
"check-ok"
)
do
Net
::
HTTP
::
Get
.
any_instance
.
should_receive
(
:set_form_data
).
with
(
hash_including
(
secret_token:
'a123'
))
Net
::
HTTP
::
Get
.
any_instance
.
should_receive
(
:set_form_data
).
with
(
hash_including
(
secret_token:
secret
))
gitlab_net
.
check
end
end
...
...
@@ -37,23 +40,23 @@ describe GitlabNet, vcr: true do
describe
:discover
do
it
'should return user has based on key id'
do
VCR
.
use_cassette
(
"discover-ok"
)
do
user
=
gitlab_net
.
discover
(
'key-126'
)
user
[
'name'
].
should
==
'
Dmitriy Zaporozhets
'
user
[
'username'
].
should
==
'
dzaporozhets
'
user
=
gitlab_net
.
discover
(
key
)
user
[
'name'
].
should
==
'
Administrator
'
user
[
'username'
].
should
==
'
root
'
end
end
it
'adds the secret_token to request'
do
VCR
.
use_cassette
(
"discover-ok"
)
do
Net
::
HTTP
::
Get
.
any_instance
.
should_receive
(
:set_form_data
).
with
(
hash_including
(
secret_token:
'a123'
))
gitlab_net
.
discover
(
'key-126'
)
Net
::
HTTP
::
Get
.
any_instance
.
should_receive
(
:set_form_data
).
with
(
hash_including
(
secret_token:
secret
))
gitlab_net
.
discover
(
key
)
end
end
it
"raises an exception if the connection fails"
do
VCR
.
use_cassette
(
"discover-ok"
)
do
Net
::
HTTP
.
any_instance
.
stub
(
:request
).
and_raise
(
StandardError
)
expect
{
gitlab_net
.
discover
(
'key-126'
)
}.
to
raise_error
(
GitlabNet
::
ApiUnreachableError
)
expect
{
gitlab_net
.
discover
(
key
)
}.
to
raise_error
(
GitlabNet
::
ApiUnreachableError
)
end
end
end
...
...
@@ -62,10 +65,10 @@ describe GitlabNet, vcr: true do
context
'lfs authentication succeeded'
do
it
'should return the correct data'
do
VCR
.
use_cassette
(
'lfs-authenticate-ok'
)
do
lfs_access
=
gitlab_net
.
lfs_authenticate
(
'key-126'
,
'gitlab/gitlabhq.git'
)
lfs_access
.
username
.
should
==
'
dzaporozhets
'
lfs_access
.
lfs_token
.
should
==
'
wsnys8Zm8Jn7zyhHTAAK
'
lfs_access
.
repository_http_path
.
should
==
'http://gitlab.dev/gitlab/gitlabhq.git'
lfs_access
=
gitlab_net
.
lfs_authenticate
(
key
,
project
)
lfs_access
.
username
.
should
==
'
root
'
lfs_access
.
lfs_token
.
should
==
'
Hyzhyde_wLUeyUQsR3tHGTG8eNocVQm4ssioTEsBSdb6KwCSzQ
'
lfs_access
.
repository_http_path
.
should
==
URI
.
join
(
host
.
sub
(
'api/v4'
,
''
),
project
).
to_s
end
end
end
...
...
@@ -111,7 +114,7 @@ describe GitlabNet, vcr: true do
end
describe
:authorized_key
do
let
(
:ssh_key
)
{
"
AAAAB3NzaC1yc2EAAAADAQABAAACAQDPKPqqnqQ9PDFw65cO7iHXrKw6ucSZg8Bd2CZ150Yy1YRDPJOWeRNCnddS+M/Lk
"
}
let
(
:ssh_key
)
{
"
rsa-key
"
}
it
"should return nil when the resource is not implemented"
do
VCR
.
use_cassette
(
"ssh-key-not-implemented"
)
do
...
...
@@ -131,10 +134,11 @@ describe GitlabNet, vcr: true do
VCR
.
use_cassette
(
"ssh-key-ok"
)
do
result
=
gitlab_net
.
authorized_key
(
ssh_key
)
result
.
should
eq
({
"created_at"
=>
"2016-03-04T18:27:36.959Z"
,
"id"
=>
2
,
"key"
=>
"ssh-rsa a-made=up-rsa-key dummy@gitlab.com"
,
"title"
=>
"some key title"
"can_push"
=>
false
,
"created_at"
=>
"2017-06-21T09:50:07.150Z"
,
"id"
=>
99
,
"key"
=>
"ssh-rsa rsa-key dummy@gitlab.com"
,
"title"
=>
"untitled"
})
end
end
...
...
@@ -143,7 +147,7 @@ describe GitlabNet, vcr: true do
describe
'#two_factor_recovery_codes'
do
it
'returns two factor recovery codes'
do
VCR
.
use_cassette
(
'two-factor-recovery-codes'
)
do
result
=
gitlab_net
.
two_factor_recovery_codes
(
'key-1'
)
result
=
gitlab_net
.
two_factor_recovery_codes
(
key
)
expect
(
result
[
'success'
]).
to
be_true
expect
(
result
[
'recovery_codes'
]).
to
eq
([
'f67c514de60c4953'
,
'41278385fc00c1e0'
])
end
...
...
@@ -151,7 +155,7 @@ describe GitlabNet, vcr: true do
it
'returns false when recovery codes cannot be generated'
do
VCR
.
use_cassette
(
'two-factor-recovery-codes-fail'
)
do
result
=
gitlab_net
.
two_factor_recovery_codes
(
'key-
1
'
)
result
=
gitlab_net
.
two_factor_recovery_codes
(
'key-
777
'
)
expect
(
result
[
'success'
]).
to
be_false
expect
(
result
[
'message'
]).
to
eq
(
'Could not find the given key'
)
end
...
...
@@ -181,40 +185,40 @@ describe GitlabNet, vcr: true do
describe
:check_access
do
context
'ssh key with access nil, to project'
do
it
'should allow pull access for
dev.gitlab.org
'
do
it
'should allow pull access for
host
'
do
VCR
.
use_cassette
(
"allowed-pull"
)
do
access
=
gitlab_net
.
check_access
(
'git-receive-pack'
,
nil
,
'gitlab/gitlabhq.git'
,
'key-126'
,
changes
,
'ssh'
)
access
=
gitlab_net
.
check_access
(
'git-receive-pack'
,
nil
,
project
,
key
,
changes
,
'ssh'
)
access
.
allowed?
.
should
be_true
end
end
it
'adds the secret_token to the request'
do
VCR
.
use_cassette
(
"allowed-pull"
)
do
Net
::
HTTP
::
Post
.
any_instance
.
should_receive
(
:set_form_data
).
with
(
hash_including
(
secret_token:
'a123'
))
gitlab_net
.
check_access
(
'git-receive-pack'
,
nil
,
'gitlab/gitlabhq.git'
,
'key-126'
,
changes
,
'ssh'
)
Net
::
HTTP
::
Post
.
any_instance
.
should_receive
(
:set_form_data
).
with
(
hash_including
(
secret_token:
secret
))
gitlab_net
.
check_access
(
'git-receive-pack'
,
nil
,
project
,
key
,
changes
,
'ssh'
)
end
end
it
'should allow push access for
dev.gitlab.org
'
do
it
'should allow push access for
host
'
do
VCR
.
use_cassette
(
"allowed-push"
)
do
access
=
gitlab_net
.
check_access
(
'git-upload-pack'
,
nil
,
'gitlab/gitlabhq.git'
,
'key-126'
,
changes
,
'ssh'
)
access
=
gitlab_net
.
check_access
(
'git-upload-pack'
,
nil
,
project
,
key
,
changes
,
'ssh'
)
access
.
allowed?
.
should
be_true
end
end
end
context
'ssh access has been disabled'
do
it
'should deny pull access for
dev.gitlab.org
'
do
VCR
.
use_cassette
(
'ssh-
access
-disabled'
)
do
access
=
gitlab_net
.
check_access
(
'git-
receive-pack'
,
nil
,
'gitlab/gitlabhq.git'
,
'key-2'
,
changes
,
'ssh'
)
it
'should deny pull access for
host
'
do
VCR
.
use_cassette
(
'ssh-
pull
-disabled'
)
do
access
=
gitlab_net
.
check_access
(
'git-
upload-pack'
,
nil
,
project
,
key
,
changes
,
'ssh'
)
access
.
allowed?
.
should
be_false
access
.
message
.
should
eq
'Git access over SSH is not allowed'
end
end
it
'should deny pu
ll access for dev.gitlab.org
'
do
VCR
.
use_cassette
(
'ssh-
access
-disabled'
)
do
access
=
gitlab_net
.
check_access
(
'git-receive-pack'
,
nil
,
'gitlab/gitlabhq.git'
,
'key-2'
,
changes
,
'ssh'
)
it
'should deny pu
sh access for host
'
do
VCR
.
use_cassette
(
'ssh-
push
-disabled'
)
do
access
=
gitlab_net
.
check_access
(
'git-receive-pack'
,
nil
,
project
,
key
,
changes
,
'ssh'
)
access
.
allowed?
.
should
be_false
access
.
message
.
should
eq
'Git access over SSH is not allowed'
end
...
...
@@ -222,41 +226,41 @@ describe GitlabNet, vcr: true do
end
context
'http access has been disabled'
do
it
'should deny pull access for
dev.gitlab.org
'
do
VCR
.
use_cassette
(
'http-
access
-disabled'
)
do
access
=
gitlab_net
.
check_access
(
'git-
receive-pack'
,
nil
,
'gitlab/gitlabhq.git'
,
'key-2'
,
changes
,
'http'
)
it
'should deny pull access for
host
'
do
VCR
.
use_cassette
(
'http-
pull
-disabled'
)
do
access
=
gitlab_net
.
check_access
(
'git-
upload-pack'
,
nil
,
project
,
key
,
changes
,
'http'
)
access
.
allowed?
.
should
be_false
access
.
message
.
should
eq
'
Git access over HTTP is not allowed
'
access
.
message
.
should
eq
'
Pulling over HTTP is not allowed.
'
end
end
it
'should deny pu
ll access for dev.gitlab.org
'
do
VCR
.
use_cassette
(
'http-access-disabled'
)
do
access
=
gitlab_net
.
check_access
(
'git-receive-pack'
,
nil
,
'gitlab/gitlabhq.git'
,
'key-2'
,
changes
,
'http'
)
it
'should deny pu
sh access for host
'
do
VCR
.
use_cassette
(
"http-push-disabled"
)
do
access
=
gitlab_net
.
check_access
(
'git-receive-pack'
,
nil
,
project
,
key
,
changes
,
'http'
)
access
.
allowed?
.
should
be_false
access
.
message
.
should
eq
'
Git access over HTTP is not allowed
'
access
.
message
.
should
eq
'
Pushing over HTTP is not allowed.
'
end
end
end
context
'ssh key without access to project'
do
it
'should deny pull access for
dev.gitlab.org
'
do
VCR
.
use_cassette
(
"
denied-pull
"
)
do
access
=
gitlab_net
.
check_access
(
'git-receive-pack'
,
nil
,
'gitlab/gitlabhq.git'
,
'key-2'
,
changes
,
'ssh'
)
it
'should deny pull access for
host
'
do
VCR
.
use_cassette
(
"
ssh-pull-project-denied
"
)
do
access
=
gitlab_net
.
check_access
(
'git-receive-pack'
,
nil
,
project
,
key2
,
changes
,
'ssh'
)
access
.
allowed?
.
should
be_false
end
end
it
'should deny push access for
dev.gitlab.org
'
do
VCR
.
use_cassette
(
"
denied-push
"
)
do
access
=
gitlab_net
.
check_access
(
'git-upload-pack'
,
nil
,
'gitlab/gitlabhq.git'
,
'key-2'
,
changes
,
'ssh'
)
it
'should deny push access for
host
'
do
VCR
.
use_cassette
(
"
ssh-push-project-denied
"
)
do
access
=
gitlab_net
.
check_access
(
'git-upload-pack'
,
nil
,
project
,
key2
,
changes
,
'ssh'
)
access
.
allowed?
.
should
be_false
end
end
it
'should deny push access for
dev.gitlab.org
(with user)'
do
VCR
.
use_cassette
(
"
denied-push
-with-user"
)
do
access
=
gitlab_net
.
check_access
(
'git-upload-pack'
,
nil
,
'gitlab/gitlabhq.git'
,
'user-1
'
,
changes
,
'ssh'
)
it
'should deny push access for
host
(with user)'
do
VCR
.
use_cassette
(
"
ssh-push-project-denied
-with-user"
)
do
access
=
gitlab_net
.
check_access
(
'git-upload-pack'
,
nil
,
project
,
'user-2
'
,
changes
,
'ssh'
)
access
.
allowed?
.
should
be_false
end
end
...
...
@@ -265,7 +269,7 @@ describe GitlabNet, vcr: true do
it
"raises an exception if the connection fails"
do
Net
::
HTTP
.
any_instance
.
stub
(
:request
).
and_raise
(
StandardError
)
expect
{
gitlab_net
.
check_access
(
'git-upload-pack'
,
nil
,
'gitlab/gitlabhq.git'
,
'user-1'
,
changes
,
'ssh'
)
gitlab_net
.
check_access
(
'git-upload-pack'
,
nil
,
project
,
'user-1'
,
changes
,
'ssh'
)
}.
to
raise_error
(
GitlabNet
::
ApiUnreachableError
)
end
end
...
...
@@ -304,7 +308,7 @@ describe GitlabNet, vcr: true do
gitlab_net
.
send
(
:config
).
http_settings
.
stub
(
:[]
).
with
(
'user'
)
{
user
}
gitlab_net
.
send
(
:config
).
http_settings
.
stub
(
:[]
).
with
(
'password'
)
{
password
}
get
.
should_receive
(
:basic_auth
).
with
(
user
,
password
).
once
get
.
should_receive
(
:set_form_data
).
with
(
hash_including
(
secret_token:
'a123'
)).
once
get
.
should_receive
(
:set_form_data
).
with
(
hash_including
(
secret_token:
secret
)).
once
end
it
{
should_not
be_nil
}
...
...
@@ -313,7 +317,7 @@ describe GitlabNet, vcr: true do
context
'Unix socket'
do
it
'sets the Host header to "localhost"'
do
gitlab_net
=
described_class
.
new
gitlab_net
.
should_receive
(
:secret_token
).
and_return
(
'a123'
)
gitlab_net
.
should_receive
(
:secret_token
).
and_return
(
secret
)
request
=
gitlab_net
.
send
(
:http_request_for
,
:get
,
URI
(
'http+unix://%2Ffoo'
))
...
...
spec/vcr_cassettes/allowed-pull.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
post
uri
:
http
s://dev.gitlab.org
/api/v4/internal/allowed
uri
:
http
://localhost:3000
/api/v4/internal/allowed
body
:
encoding
:
US-ASCII
string
:
action=git-receive-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
project=gitlab%2Fgitlabhq&key_id=126&secret_token=a123
string
:
action=git-receive-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
gl_repository&project=gitlab-org%2Fgitlab-test.git&protocol=ssh&env=%7B%7D&key_id=1&secret_token=0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -20,29 +20,27 @@ http_interactions:
code
:
200
message
:
OK
headers
:
Server
:
-
nginx/1.1.19
Date
:
-
Wed, 03 Sep 2014 11:27:36 GMT
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
155'
Content-Type
:
-
application/json
Content-Length
:
-
'
4'
Connection
:
-
keep-alive
Status
:
-
200 OK
Date
:
-
Wed, 21 Jun 2017 10:44:52 GMT
Etag
:
-
'
"b326b5062b2f0e69046810717534cb09"'
Cache-Control
:
-
max-age=0, private, must-revalidate
-
W/"45654cae433b5a9c5fbba1d45d382e52"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
8
5bfa9b3-fddc-4810-a033-f1eabc04c66c
-
8
d4b8b06-fb6e-4f94-832f-72f8e0afad5f
X-Runtime
:
-
'
0.
089741
'
-
'
0.
289759
'
body
:
encoding
:
UTF-8
string
:
'
{"status":
"true
"}'
string
:
'
{"status":
true,"gl_repository":"project-3","repository_path":"/Users/dzaporozhets/Projects/gitlab-development-kit/repositories/gitlab-org/gitlab-test.git
"}'
http_version
:
recorded_at
:
Wed,
03 Sep 2014 11:27:36
GMT
recorded_at
:
Wed,
21 Jun 2017 10:44:52
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/allowed-push.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
post
uri
:
http
s://dev.gitlab.org
/api/v4/internal/allowed
uri
:
http
://localhost:3000
/api/v4/internal/allowed
body
:
encoding
:
US-ASCII
string
:
action=git-upload-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
project=gitlab%2Fgitlabhq&key_id=126&secret_token=a123
string
:
action=git-upload-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
gl_repository&project=gitlab-org%2Fgitlab-test.git&protocol=ssh&env=%7B%7D&key_id=1&secret_token=0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -20,29 +20,27 @@ http_interactions:
code
:
200
message
:
OK
headers
:
Server
:
-
nginx/1.1.19
Date
:
-
Wed, 03 Sep 2014 11:27:37 GMT
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
155'
Content-Type
:
-
application/json
Content-Length
:
-
'
4'
Connection
:
-
keep-alive
Status
:
-
200 OK
Date
:
-
Wed, 21 Jun 2017 10:44:52 GMT
Etag
:
-
'
"b326b5062b2f0e69046810717534cb09"'
Cache-Control
:
-
max-age=0, private, must-revalidate
-
W/"45654cae433b5a9c5fbba1d45d382e52"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
115e7a72-b3a6-49e1-b531-980c71088c9d
-
67ab4954-19e6-42ce-aae6-55c8ae5a365e
X-Runtime
:
-
'
0.
833195
'
-
'
0.
230871
'
body
:
encoding
:
UTF-8
string
:
'
{"status":
"true
"}'
string
:
'
{"status":
true,"gl_repository":"project-3","repository_path":"/Users/dzaporozhets/Projects/gitlab-development-kit/repositories/gitlab-org/gitlab-test.git
"}'
http_version
:
recorded_at
:
Wed,
03 Sep 2014 11:27:37
GMT
recorded_at
:
Wed,
21 Jun 2017 10:44:52
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/broadcast_message-none.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
get
uri
:
http
s://dev.gitlab.org
/api/v4/internal/broadcast_message
uri
:
http
://localhost:3000
/api/v4/internal/broadcast_message
body
:
encoding
:
US-ASCII
string
:
secret_token=
a123
string
:
secret_token=
0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -13,26 +13,34 @@ http_interactions:
-
"
*/*"
User-Agent
:
-
Ruby
Content-Type
:
-
application/x-www-form-urlencoded
response
:
status
:
code
:
200
message
:
Not Found
message
:
OK
headers
:
Server
:
-
nginx/1.1.19
Date
:
-
Sat, 07 Feb 2015 16:45:35 GMT
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
2'
Content-Type
:
-
application/json
Content-Length
:
-
'
27'
Connection
:
-
keep-alive
Status
:
-
200 OK
Date
:
-
Wed, 21 Jun 2017 10:44:50 GMT
Etag
:
-
W/"99914b932bd37a50b983c5e7c90ae93b"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
d31271ab-e21f-4349-a4c3-54f238c075c3
X-Runtime
:
-
'
0.254031'
body
:
encoding
:
UTF-8
string
:
'
{}'
string
:
"
{}"
http_version
:
recorded_at
:
Sat, 07 Feb 2015 16:45:35
GMT
recorded_at
:
Wed, 21 Jun 2017 10:44:50
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/broadcast_message-ok.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
get
uri
:
http
s://dev.gitlab.org
/api/v4/internal/broadcast_message
uri
:
http
://localhost:3000
/api/v4/internal/broadcast_message
body
:
encoding
:
US-ASCII
string
:
secret_token=
a123
string
:
secret_token=
0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -13,26 +13,34 @@ http_interactions:
-
"
*/*"
User-Agent
:
-
Ruby
Content-Type
:
-
application/x-www-form-urlencoded
response
:
status
:
code
:
200
message
:
OK
headers
:
Server
:
-
nginx/1.1.19
Date
:
-
Sat, 07 Feb 2015 16:44:35 GMT
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
153'
Content-Type
:
-
application/json
Content-Length
:
-
'
118'
Connection
:
-
keep-alive
Status
:
-
200 OK
Date
:
-
Wed, 21 Jun 2017 12:29:13 GMT
Etag
:
-
W/"ce6de457fcc884f50125e81a10f165ce"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
ebaaf2c2-112e-4b3c-9182-e8714cd2a29c
X-Runtime
:
-
'
0.276085'
body
:
encoding
:
UTF-8
string
:
'
{"message":"Message","starts_at":"201
5-02-07T15:35:00.000Z","ends_at":"2015-02-07T16:35:00.000Z","color":"","font":""
}'
string
:
'
{"message":"Message","starts_at":"201
7-06-21T12:28:00.000Z","ends_at":"2017-06-21T12:35:00.000Z","color":"#e75e40","font":"#ffffff","id":1,"active":true
}'
http_version
:
recorded_at
:
Sat, 07 Feb 2015 16:44:35
GMT
recorded_at
:
Wed, 21 Jun 2017 12:29:13
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/check-ok.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
get
uri
:
http
s://dev.gitlab.org
/api/v4/internal/check
uri
:
http
://localhost:3000
/api/v4/internal/check
body
:
encoding
:
US-ASCII
string
:
secret_token=
a123
string
:
secret_token=
0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -13,34 +13,34 @@ http_interactions:
-
"
*/*"
User-Agent
:
-
Ruby
Content-Type
:
-
application/x-www-form-urlencoded
response
:
status
:
code
:
200
message
:
OK
headers
:
Server
:
-
nginx/1.1.19
Date
:
-
Wed, 03 Sep 2014 11:27:35 GMT
Content-Type
:
-
application/json
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
72'
Con
nection
:
-
keep-alive
Status
:
-
200 OK
Con
tent-Type
:
-
application/json
Date
:
-
Wed, 21 Jun 2017 10:44:49 GMT
Etag
:
-
'
"23ee74bf6981b57b9d0e0d8a91f3ec1b"'
Cache-Control
:
-
max-age=0, private, must-revalidate
-
W/"e1b00c927355c31ffb83b0800821cdbd"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
c389e282-4d7b-4041-9aed-336e5b007424
-
19d8b75c-45d1-4b8b-9e47-2fda86f98187
X-Runtime
:
-
'
0.
958718
'
-
'
0.
245482
'
body
:
encoding
:
UTF-8
string
:
'
{"api_version":"v4","gitlab_version":"
7.3.0.pre","gitlab_rev":"e8f1331
"}'
string
:
'
{"api_version":"v4","gitlab_version":"
9.3.0-pre","gitlab_rev":"8f537e5
"}'
http_version
:
recorded_at
:
Wed,
03 Sep 2014 11:27:35
GMT
recorded_at
:
Wed,
21 Jun 2017 10:44:49
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/discover-ok.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
get
uri
:
http
s://dev.gitlab.org/api/v4/internal/discover?key_id=126
uri
:
http
://localhost:3000/api/v4/internal/discover?key_id=1
body
:
encoding
:
US-ASCII
string
:
secret_token=
a123
string
:
secret_token=
0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -13,34 +13,34 @@ http_interactions:
-
"
*/*"
User-Agent
:
-
Ruby
Content-Type
:
-
application/x-www-form-urlencoded
response
:
status
:
code
:
200
message
:
OK
headers
:
Server
:
-
nginx/1.1.19
Date
:
-
Wed, 03 Sep 2014 11:27:35 GMT
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
42'
Content-Type
:
-
application/json
Content-Length
:
-
'
56'
Connection
:
-
keep-alive
Status
:
-
200 OK
Date
:
-
Wed, 21 Jun 2017 10:44:49 GMT
Etag
:
-
'
"1d75c1cf3d4bfa4d2b7bb6a0bcfd7f55"'
Cache-Control
:
-
max-age=0, private, must-revalidate
-
W/"63b4ab301951bea83c4fc398eba8e307"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
ef4513ae-0424-4941-8be0-b5a3a7b4bf12
-
dc11b8d4-1972-417b-8305-2c35c849405c
X-Runtime
:
-
'
0.
016934
'
-
'
0.
230170
'
body
:
encoding
:
UTF-8
string
:
'
{"name":"
Dmitriy
Zaporozhets","username":"dzaporozhets
"}'
string
:
'
{"name":"
Administrator","username":"root
"}'
http_version
:
recorded_at
:
Wed,
03 Sep 2014 11:27:35
GMT
recorded_at
:
Wed,
21 Jun 2017 10:44:49
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/
denied-push-with-user
.yml
→
spec/vcr_cassettes/
http-pull-disabled
.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
post
uri
:
http
s://dev.gitlab.org
/api/v4/internal/allowed
uri
:
http
://localhost:3000
/api/v4/internal/allowed
body
:
encoding
:
US-ASCII
string
:
action=git-upload-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
project=gitlab%2Fgitlabhq&user_id=1&secret_token=a123
string
:
action=git-upload-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
gl_repository&project=gitlab-org%2Fgitlab-test.git&protocol=http&env=%7B%7D&key_id=1&secret_token=0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -20,29 +20,27 @@ http_interactions:
code
:
200
message
:
OK
headers
:
Server
:
-
nginx/1.1.19
Date
:
-
Wed, 03 Sep 2014 11:27:39 GMT
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
62'
Content-Type
:
-
application/json
Content-Length
:
-
'
4'
Connection
:
-
keep-alive
Status
:
-
200 OK
Date
:
-
Wed, 21 Jun 2017 10:32:01 GMT
Etag
:
-
'
"b326b5062b2f0e69046810717534cb09"'
Cache-Control
:
-
max-age=0, private, must-revalidate
-
W/"71e09fcf8a60a03cd1acc22806386ead"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
8bd01f76-6029-4921-ba97-12323a7d5750
-
70bdecc9-0078-4a4b-aa6b-cac1b2578886
X-Runtime
:
-
'
0.
019640
'
-
'
0.
324202
'
body
:
encoding
:
UTF-8
string
:
'
{"status":
false
}'
string
:
'
{"status":
false,"message":"Pulling
over
HTTP
is
not
allowed."
}'
http_version
:
recorded_at
:
Wed,
03 Sep 2014 11:27:39
GMT
recorded_at
:
Wed,
21 Jun 2017 10:32:01
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/
ssh-access
-disabled.yml
→
spec/vcr_cassettes/
http-push
-disabled.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
post
uri
:
http
s://dev.gitlab.org
/api/v4/internal/allowed
uri
:
http
://localhost:3000
/api/v4/internal/allowed
body
:
encoding
:
US-ASCII
string
:
action=git-receive-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
project=gitlab%2Fgitlabhq&protocol=ssh&key_id=2&secret_token=a123
string
:
action=git-receive-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
gl_repository&project=gitlab-org%2Fgitlab-test.git&protocol=http&env=%7B%7D&key_id=1&secret_token=0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -21,24 +21,26 @@ http_interactions:
message
:
OK
headers
:
Cache-Control
:
-
no-cach
e
-
max-age=0, private, must-revalidat
e
Content-Length
:
-
'
30
'
-
'
62
'
Content-Type
:
-
application/json
Date
:
-
Wed, 2
2 Jun 2016 01:01:4
1 GMT
Status
:
-
200 OK
-
Wed, 2
1 Jun 2017 10:32:0
1 GMT
Etag
:
-
W/"7f14e23ac07cc8b0a53c567fcf9432fd"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
5
5b7af2c-3559-41d2-b301-9b86ad1d8fac
-
5
73f3584-87c6-41cb-a5bf-5e7ee76d4250
X-Runtime
:
-
'
2.28089
5'
-
'
0.26613
5'
body
:
encoding
:
UTF-8
string
:
'
{"status":
false,
"message":"Git
access
over
SSH
is
not
allowed
"}'
string
:
'
{"status":
false,"message":"Pushing
over
HTTP
is
not
allowed.
"}'
http_version
:
recorded_at
:
Wed, 2
2 Jun 2016 01:01:4
1 GMT
recorded_at
:
Wed, 2
1 Jun 2017 10:32:0
1 GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/lfs-authenticate-ok.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
post
uri
:
http
s://dev.gitlab.org
/api/v4/internal/lfs_authenticate
uri
:
http
://localhost:3000
/api/v4/internal/lfs_authenticate
body
:
encoding
:
US-ASCII
string
:
project=gitlab
%2Fgitlabhq&key_id=126&secret_token=a123
string
:
project=gitlab
-org%2Fgitlab-test.git&key_id=1&secret_token=0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -13,34 +13,34 @@ http_interactions:
-
"
*/*"
User-Agent
:
-
Ruby
Content-Type
:
-
application/x-www-form-urlencoded
response
:
status
:
code
:
200
message
:
OK
headers
:
Server
:
-
nginx/1.1.19
Date
:
-
Wed, 03 Sep 2014 11:27:35 GMT
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
158'
Content-Type
:
-
application/json
Content-Length
:
-
'
56'
Connection
:
-
keep-alive
Status
:
-
200 OK
Date
:
-
Wed, 21 Jun 2017 10:44:50 GMT
Etag
:
-
'
"1d75c1cf3d4bfa4d2b7bb6a0bcfd7f55"'
Cache-Control
:
-
max-age=0, private, must-revalidate
-
W/"0a8ccf1603566e521c169d5e43c86cd2"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
ef4513ae-0424-4941-8be0-b5a3a7b4bf12
-
d82d6071-1868-4a37-b026-65ab37f96f2f
X-Runtime
:
-
'
0.
016934
'
-
'
0.
331056
'
body
:
encoding
:
UTF-8
string
:
'
{"username":"
dzaporozhets","lfs_token":"wsnys8Zm8Jn7zyhHTAAK","repository_http_path":"http://gitlab.dev/gitlab/gitlabhq
.git"}'
string
:
'
{"username":"
root","lfs_token":"Hyzhyde_wLUeyUQsR3tHGTG8eNocVQm4ssioTEsBSdb6KwCSzQ","repository_http_path":"http://localhost:3000/gitlab-org/gitlab-test
.git"}'
http_version
:
recorded_at
:
Wed,
03 Sep 2014 11:27:35
GMT
recorded_at
:
Wed,
21 Jun 2017 10:44:50
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/notify-post-receive.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
post
uri
:
http
s://dev.gitlab.org
/api/v4/internal/notify_post_receive
uri
:
http
://localhost:3000
/api/v4/internal/notify_post_receive
body
:
encoding
:
US-ASCII
string
:
gl_repository=project-1&
repo_path=%2Fpath%2Fto%2Fmy%2Frepo.git&secret_token=a123
string
:
gl_repository=project-1&
project=%2Fpath%2Fto%2Fmy%2Frepo.git&secret_token=0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -23,22 +23,24 @@ http_interactions:
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
2
'
-
'
3
'
Content-Type
:
-
application/json
Date
:
-
Fri, 28 Apr 2017 20:07:14
GMT
-
Wed, 21 Jun 2017 12:47:48
GMT
Etag
:
-
W/"
99914b932bd37a50b983c5e7c90ae93b
"
-
W/"
3644a684f98ea8fe223c713b77189a77
"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
40
4a3fa8-28ca-40d6-acbb-7923c7fbf342
-
40
7b184d-d6cf-43db-93fa-3f2d97112948
X-Runtime
:
-
'
3.988681
'
-
'
6.626186
'
body
:
encoding
:
UTF-8
string
:
"
{}"
string
:
'
200'
http_version
:
recorded_at
:
Fri, 28 Apr 2017 20:07:14
GMT
recorded_at
:
Wed, 21 Jun 2017 12:47:48
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/ssh-key-not-found.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
get
uri
:
http
s://dev.gitlab.org
/api/v4/internal/authorized_keys?key=whatever
uri
:
http
://localhost:3000
/api/v4/internal/authorized_keys?key=whatever
body
:
encoding
:
US-ASCII
string
:
secret_token=
a123
string
:
secret_token=
0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -20,31 +20,25 @@ http_interactions:
code
:
404
message
:
Not Found
headers
:
Server
:
-
nginx
Date
:
-
Mon, 07 Mar 2016 12:09:59 GMT
Content-Type
:
-
text/html; charset=utf-8
Connection
:
-
keep-alive
Cache-Control
:
-
no-cache
Set-Cookie
:
-
_gitlab_session=a924e63729e538c9efe10fa8338077d7; path=/; expires=Mon,
14
Mar 2016 12:09:59 -0000; secure; HttpOnly
Status
:
-
404 Not Found
X-Content-Type-Options
:
-
nosniff
Content-Length
:
-
'
31'
Content-Type
:
-
application/json
Date
:
-
Wed, 21 Jun 2017 12:15:09 GMT
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
275ad011-515f-4239-80be-e537fd7c908
6
-
c829f804-616e-4046-9b70-cc6a2a55916
6
X-Runtime
:
-
'
2.169401'
X-Xss-Protection
:
-
1; mode=block
-
'
0.281120'
body
:
encoding
:
UTF-8
string
:
'
{"message":"404
Key
Not
Found"}'
http_version
:
recorded_at
:
Mon, 07 Mar 2016 12:10:00
GMT
recorded_at
:
Wed, 21 Jun 2017 12:15:09
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/ssh-key-not-implemented.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
get
uri
:
http
s://dev.gitlab.org
/api/v4/internal/authorized_keys?key=whatever
uri
:
http
://localhost:3000
/api/v4/internal/authorized_keys?key=whatever
body
:
encoding
:
US-ASCII
string
:
secret_token=
a123
string
:
secret_token=
0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -17,34 +17,28 @@ http_interactions:
-
application/x-www-form-urlencoded
response
:
status
:
code
:
501
message
:
Not
Implemente
d
code
:
404
message
:
Not
Foun
d
headers
:
Server
:
-
nginx
Date
:
-
Mon, 07 Mar 2016 12:09:59 GMT
Content-Type
:
-
text/html; charset=utf-8
Connection
:
-
keep-alive
Cache-Control
:
-
no-cache
Set-Cookie
:
-
_gitlab_session=a924e63729e538c9efe10fa8338077d7; path=/; expires=Mon,
14
Mar 2016 12:09:59 -0000; secure; HttpOnly
Status
:
-
501 Not Implemented
X-Content-Type-Options
:
-
nosniff
Content-Length
:
-
'
31'
Content-Type
:
-
application/json
Date
:
-
Wed, 21 Jun 2017 12:15:09 GMT
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
275ad011-515f-4239-80be-e537fd7c9086
-
4bcc3073-f32d-4e07-994e-5eb476b23d41
X-Runtime
:
-
'
2.169401'
X-Xss-Protection
:
-
1; mode=block
-
'
0.448808'
body
:
encoding
:
UTF-8
string
:
'
{"message":"404
Key
Not
Found"}'
http_version
:
recorded_at
:
Mon, 07 Mar 2016 12:10:00
GMT
recorded_at
:
Wed, 21 Jun 2017 12:15:09
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/ssh-key-ok.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
get
uri
:
http
s://dev.gitlab.org/api/v4/internal/authorized_keys?key=AAAAB3NzaC1yc2EAAAADAQABAAACAQDPKPqqnqQ9PDFw65cO7iHXrKw6ucSZg8Bd2CZ150Yy1YRDPJOWeRNCnddS+M/Lk
uri
:
http
://localhost:3000/api/v4/internal/authorized_keys?key=rsa-key
body
:
encoding
:
US-ASCII
string
:
secret_token=
a123
string
:
secret_token=
0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -20,21 +20,28 @@ http_interactions:
code
:
200
message
:
OK
headers
:
Server
:
-
nginx/1.1.19
Date
:
-
Wed, 03 Sep 2014 11:27:35 GMT
Content-Type
:
-
application/json
Connection
:
-
keep-alive
Status
:
-
200 OK
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
686'
Content-Type
:
-
application/json
Date
:
-
Wed, 21 Jun 2017 12:16:41 GMT
Etag
:
-
W/"18dfce1367306a2dda6aaf8b1e7795a8"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
839ab67c-7b72-44e0-916e-ca4f68c25604
X-Runtime
:
-
'
9.070282'
body
:
encoding
:
UTF-8
string
:
'
{"id":2,
"title":"some
key
title",
"key":"ssh-rsa
a-made=up-rsa-key
dummy@gitlab.com",
"created_at":"2016-03-04T18:27:36.959Z"}'
string
:
'
{"id":99,"title":"untitled","key":"ssh-rsa
rsa-key
dummy@gitlab.com","created_at":"2017-06-21T09:50:07.150Z","can_push":false}'
http_version
:
recorded_at
:
Mon, 07 Mar 2016 12:10:00
GMT
recorded_at
:
Wed, 21 Jun 2017 12:16:41
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/
denied-push
.yml
→
spec/vcr_cassettes/
ssh-pull-disabled
.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
post
uri
:
http
s://dev.gitlab.org
/api/v4/internal/allowed
uri
:
http
://localhost:3000
/api/v4/internal/allowed
body
:
encoding
:
US-ASCII
string
:
action=git-upload-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
project=gitlab%2Fgitlabhq&key_id=2&secret_token=a123
string
:
action=git-upload-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
gl_repository&project=gitlab-org%2Fgitlab-test.git&protocol=ssh&env=%7B%7D&key_id=1&secret_token=0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -17,30 +17,30 @@ http_interactions:
-
application/x-www-form-urlencoded
response
:
status
:
code
:
404
message
:
Not Found
code
:
200
message
:
OK
headers
:
Server
:
-
nginx/1.1.19
Date
:
-
Wed, 03 Sep 2014 11:27:38 GMT
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
63'
Content-Type
:
-
application/json
Content-Length
:
-
'
27'
Connection
:
-
keep-alive
Status
:
-
404 Not Found
Cache-Control
:
-
no-cache
Date
:
-
Wed, 21 Jun 2017 12:23:57 GMT
Etag
:
-
W/"76a32010244f80700d5e1ba8a55d094c"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
8b0210d2-4db5-4325-8120-740e22eaf7d5
-
096ae253-c6fe-4360-b4d4-48f4b5435ca6
X-Runtime
:
-
'
0.015198
'
-
'
6.377187
'
body
:
encoding
:
UTF-8
string
:
'
{"status":
false,
"message":"404
Not
foun
d"}'
string
:
'
{"status":
false,"message":"Git
access
over
SSH
is
not
allowe
d"}'
http_version
:
recorded_at
:
Wed,
03 Sep 2014 11:27:38
GMT
recorded_at
:
Wed,
21 Jun 2017 12:23:57
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/
http-access-disabl
ed.yml
→
spec/vcr_cassettes/
ssh-pull-project-deni
ed.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
post
uri
:
http
s://dev.gitlab.org
/api/v4/internal/allowed
uri
:
http
://localhost:3000
/api/v4/internal/allowed
body
:
encoding
:
US-ASCII
string
:
action=git-receive-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
project=gitlab%2Fgitlabhq&protocol=http&key_id=2&secret_token=a123
string
:
action=git-receive-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
gl_repository&project=gitlab-org%2Fgitlab-test.git&protocol=ssh&env=%7B%7D&key_id=2&secret_token=0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -21,24 +21,26 @@ http_interactions:
message
:
OK
headers
:
Cache-Control
:
-
no-cach
e
-
max-age=0, private, must-revalidat
e
Content-Length
:
-
'
30
'
-
'
63
'
Content-Type
:
-
application/json
Date
:
-
Wed, 2
2 Jun 2016 01:03:41
GMT
Status
:
-
200 OK
-
Wed, 2
1 Jun 2017 12:24:04
GMT
Etag
:
-
W/"76a32010244f80700d5e1ba8a55d094c"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
55b7af2c-3559-41d2-b301-9b86ad1d8fac
-
c843a5a3-fc08-46eb-aa45-caceae515638
X-Runtime
:
-
'
2.28089
5'
-
'
7.35983
5'
body
:
encoding
:
UTF-8
string
:
'
{"status":
false,
"message":"Git
access
over
HTTP
is
not
allowed"}'
string
:
'
{"status":
false,"message":"Git
access
over
SSH
is
not
allowed"}'
http_version
:
recorded_at
:
Wed, 2
2 Jun 2016 01:03:41
GMT
recorded_at
:
Wed, 2
1 Jun 2017 12:24:04
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/
denied-pull
.yml
→
spec/vcr_cassettes/
ssh-push-disabled
.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
post
uri
:
http
s://dev.gitlab.org
/api/v4/internal/allowed
uri
:
http
://localhost:3000
/api/v4/internal/allowed
body
:
encoding
:
US-ASCII
string
:
action=git-receive-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
project=gitlab%2Fgitlabhq&key_id=2&secret_token=a123
string
:
action=git-receive-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&
gl_repository&project=gitlab-org%2Fgitlab-test.git&protocol=ssh&env=%7B%7D&key_id=1&secret_token=0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -17,30 +17,30 @@ http_interactions:
-
application/x-www-form-urlencoded
response
:
status
:
code
:
404
message
:
Not Found
code
:
200
message
:
OK
headers
:
Server
:
-
nginx/1.1.19
Date
:
-
Wed, 03 Sep 2014 11:27:38 GMT
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
63'
Content-Type
:
-
application/json
Content-Length
:
-
'
27'
Connection
:
-
keep-alive
Status
:
-
404 Not Found
Cache-Control
:
-
no-cache
Date
:
-
Wed, 21 Jun 2017 12:23:57 GMT
Etag
:
-
W/"76a32010244f80700d5e1ba8a55d094c"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
f9c23a82-be65-41c8-958a-5f3e1b9aa58b
-
93620e06-fda9-4be5-855e-300f5d62fa3c
X-Runtime
:
-
'
0.
028027
'
-
'
0.
207159
'
body
:
encoding
:
UTF-8
string
:
'
{"status":
false,
"message":"404
Not
foun
d"}'
string
:
'
{"status":
false,"message":"Git
access
over
SSH
is
not
allowe
d"}'
http_version
:
recorded_at
:
Wed,
03 Sep 2014 11:27:38
GMT
recorded_at
:
Wed,
21 Jun 2017 12:23:57
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/ssh-push-project-denied-with-user.yml
0 → 100644
View file @
b262d92e
---
http_interactions
:
-
request
:
method
:
post
uri
:
http://localhost:3000/api/v4/internal/allowed
body
:
encoding
:
US-ASCII
string
:
action=git-upload-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&gl_repository&project=gitlab-org%2Fgitlab-test.git&protocol=ssh&env=%7B%7D&user_id=2&secret_token=0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept
:
-
"
*/*"
User-Agent
:
-
Ruby
Content-Type
:
-
application/x-www-form-urlencoded
response
:
status
:
code
:
200
message
:
OK
headers
:
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
63'
Content-Type
:
-
application/json
Date
:
-
Wed, 21 Jun 2017 12:24:05 GMT
Etag
:
-
W/"76a32010244f80700d5e1ba8a55d094c"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
3b242d73-d860-48ac-8fef-80e2d0d3daca
X-Runtime
:
-
'
0.342469'
body
:
encoding
:
UTF-8
string
:
'
{"status":false,"message":"Git
access
over
SSH
is
not
allowed"}'
http_version
:
recorded_at
:
Wed, 21 Jun 2017 12:24:05 GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/ssh-push-project-denied.yml
0 → 100644
View file @
b262d92e
---
http_interactions
:
-
request
:
method
:
post
uri
:
http://localhost:3000/api/v4/internal/allowed
body
:
encoding
:
US-ASCII
string
:
action=git-upload-pack&changes=0000000000000000000000000000000000000000+92d0970eefd7acb6d548878925ce2208cfe2d2ec+refs%2Fheads%2Fbranch4&gl_repository&project=gitlab-org%2Fgitlab-test.git&protocol=ssh&env=%7B%7D&key_id=2&secret_token=0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept
:
-
"
*/*"
User-Agent
:
-
Ruby
Content-Type
:
-
application/x-www-form-urlencoded
response
:
status
:
code
:
200
message
:
OK
headers
:
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
63'
Content-Type
:
-
application/json
Date
:
-
Wed, 21 Jun 2017 12:24:04 GMT
Etag
:
-
W/"76a32010244f80700d5e1ba8a55d094c"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
8ce54f29-9ed0-46e5-aedb-37edaa3d52da
X-Runtime
:
-
'
0.228256'
body
:
encoding
:
UTF-8
string
:
'
{"status":false,"message":"Git
access
over
SSH
is
not
allowed"}'
http_version
:
recorded_at
:
Wed, 21 Jun 2017 12:24:04 GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/two-factor-recovery-codes-fail.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
post
uri
:
http
s://dev.gitlab.org
/api/v4/internal/two_factor_recovery_codes
uri
:
http
://localhost:3000
/api/v4/internal/two_factor_recovery_codes
body
:
encoding
:
US-ASCII
string
:
username=user-1&secret_token=a123
string
:
key_id=777&secret_token=0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -20,23 +20,27 @@ http_interactions:
code
:
200
message
:
OK
headers
:
Server
:
-
nginx
Date
:
-
Tue, 16 Aug 2016 22:10:11 GMT
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
58'
Content-Type
:
-
application/json
Connection
:
-
keep-alive
Status
:
-
200 OK
Date
:
-
Wed, 21 Jun 2017 12:33:42 GMT
Etag
:
-
W/"2642e3904bef8fa05ab8e0ca78c19047"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
4467029d-51c6-41bc-af5f-6da279dbb238
-
7f8f2587-f6a2-445a-97a2-36fb9ea8f2d2
X-Runtime
:
-
'
0.
00458
9'
-
'
0.
19640
9'
body
:
encoding
:
UTF-8
string
:
'
{
"success":
false,
"message":
"Could
not
find
the
given
key"
}'
string
:
'
{
"success":false,"message":"Could
not
find
the
given
key"
}'
http_version
:
recorded_at
:
Tue, 16 Aug 2016 22:10:11
GMT
recorded_at
:
Wed, 21 Jun 2017 12:33:42
GMT
recorded_with
:
VCR 2.4.0
spec/vcr_cassettes/two-factor-recovery-codes.yml
View file @
b262d92e
...
...
@@ -2,10 +2,10 @@
http_interactions
:
-
request
:
method
:
post
uri
:
http
s://dev.gitlab.org
/api/v4/internal/two_factor_recovery_codes
uri
:
http
://localhost:3000
/api/v4/internal/two_factor_recovery_codes
body
:
encoding
:
US-ASCII
string
:
username=user-1&secret_token=a123
string
:
key_id=1&secret_token=0a3938d9d95d807e94d937af3a4fbbea%0A
headers
:
Accept-Encoding
:
-
gzip;q=1.0,deflate;q=0.6,identity;q=0.3
...
...
@@ -20,23 +20,27 @@ http_interactions:
code
:
200
message
:
OK
headers
:
Server
:
-
nginx
Date
:
-
Tue, 16 Aug 2016 22:10:11 GMT
Cache-Control
:
-
max-age=0, private, must-revalidate
Content-Length
:
-
'
225'
Content-Type
:
-
application/json
Connection
:
-
keep-alive
Status
:
-
200 OK
Date
:
-
Wed, 21 Jun 2017 12:31:42 GMT
Etag
:
-
W/"087adad20960d665d59e7e4ca02efd28"
Vary
:
-
Origin
X-Frame-Options
:
-
SAMEORIGIN
X-Request-Id
:
-
4467029d-51c6-41bc-af5f-6da279dbb238
-
a0e1c950-83a7-4fed-afb0-bfb01d104795
X-Runtime
:
-
'
0.004589
'
-
'
1.378088
'
body
:
encoding
:
UTF-8
string
:
'
{
"success":
true,
"recovery_codes":
["f67c514de60c4953","41278385fc00c1e0"]
}'
string
:
'
{
"success":true,"recovery_codes":["f67c514de60c4953","41278385fc00c1e0"]
}'
http_version
:
recorded_at
:
Tue, 16 Aug 2016 22:10:11
GMT
recorded_at
:
Wed, 21 Jun 2017 12:31:42
GMT
recorded_with
:
VCR 2.4.0
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