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
80835629
Commit
80835629
authored
Jul 07, 2017
by
Kim "BKC" Carlbäcker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tokens!
parent
164baba2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
go/internal/handler/handler.go
go/internal/handler/handler.go
+1
-1
go/internal/handler/receive_pack.go
go/internal/handler/receive_pack.go
+1
-1
go/internal/handler/upload_pack.go
go/internal/handler/upload_pack.go
+1
-1
No files found.
go/internal/handler/handler.go
View file @
80835629
...
@@ -41,7 +41,7 @@ func execCommand(command string, args ...string) error {
...
@@ -41,7 +41,7 @@ func execCommand(command string, args ...string) error {
return
syscall
.
Exec
(
binPath
,
args
,
os
.
Environ
())
return
syscall
.
Exec
(
binPath
,
args
,
os
.
Environ
())
}
}
func
dialOpts
(
token
string
)
[]
grpc
.
DialOption
{
func
dialOpts
()
[]
grpc
.
DialOption
{
connOpts
:=
client
.
DefaultDialOpts
connOpts
:=
client
.
DefaultDialOpts
if
token
:=
os
.
Getenv
(
"GITALY_TOKEN"
);
token
!=
""
{
if
token
:=
os
.
Getenv
(
"GITALY_TOKEN"
);
token
!=
""
{
connOpts
=
append
(
client
.
DefaultDialOpts
,
grpc
.
WithPerRPCCredentials
(
gitalyauth
.
RPCCredentials
(
token
)))
connOpts
=
append
(
client
.
DefaultDialOpts
,
grpc
.
WithPerRPCCredentials
(
gitalyauth
.
RPCCredentials
(
token
)))
...
...
go/internal/handler/receive_pack.go
View file @
80835629
...
@@ -14,7 +14,7 @@ func ReceivePack(gitalyAddress string, request *pb.SSHReceivePackRequest) (int32
...
@@ -14,7 +14,7 @@ func ReceivePack(gitalyAddress string, request *pb.SSHReceivePackRequest) (int32
return
0
,
fmt
.
Errorf
(
"no gitaly_address given"
)
return
0
,
fmt
.
Errorf
(
"no gitaly_address given"
)
}
}
conn
,
err
:=
client
.
Dial
(
gitalyAddress
,
dialOpts
(
os
.
Getenv
(
"GITALY_TOKEN"
)
))
conn
,
err
:=
client
.
Dial
(
gitalyAddress
,
dialOpts
())
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
err
return
0
,
err
}
}
...
...
go/internal/handler/upload_pack.go
View file @
80835629
...
@@ -14,7 +14,7 @@ func UploadPack(gitalyAddress string, request *pb.SSHUploadPackRequest) (int32,
...
@@ -14,7 +14,7 @@ func UploadPack(gitalyAddress string, request *pb.SSHUploadPackRequest) (int32,
return
0
,
fmt
.
Errorf
(
"no gitaly_address given"
)
return
0
,
fmt
.
Errorf
(
"no gitaly_address given"
)
}
}
conn
,
err
:=
client
.
Dial
(
gitalyAddress
,
dialOpts
(
os
.
Getenv
(
"GITALY_TOKEN"
)
))
conn
,
err
:=
client
.
Dial
(
gitalyAddress
,
dialOpts
())
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
err
return
0
,
err
}
}
...
...
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