1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-30 10:11:23 +02:00

moving the private key out of root and into a more sensical location till it's configurable

This commit is contained in:
Joachim Hill-Grannec 2016-04-19 10:44:19 -07:00
parent b89b7cff5b
commit 16ddb75d08
2 changed files with 5 additions and 4 deletions

View File

@ -6,9 +6,9 @@ package bitbucketserver
// Configure application links in the bitbucket server --
// application url needs to be the base url to drone
// incoming auth needs to have the consumer key (same as the key in REMOTE_CONFIG)
// set the public key (public key from the private key added to /private_key.pem name matters)
// set the public key (public key from the private key added to /var/lib/bitbucketserver/private_key.pem name matters)
// consumer call back is the base url to drone plus /authorize/
// Needs a pem private key added to / something like "ADD private_key.pem /" (name matters, needs to be /private_key.pem) to the Dockerfile
// Needs a pem private key added to /var/lib/bitbucketserver/private_key.pem
// After that you should be good to go
@ -80,7 +80,7 @@ func (bs *BitbucketServer) Login(res http.ResponseWriter, req *http.Request) (*m
client, err := c.MakeHttpClient(accessToken)
if err != nil {
log.error(err)
log.Error(err)
}
response, err := client.Get(bs.URL + "/plugins/servlet/applinks/whoami")

View File

@ -12,7 +12,8 @@ import (
func NewClient(ConsumerKey string, URL string) *oauth.Consumer{
privateKeyFileContents, err := ioutil.ReadFile("/private_key.pem")
//TODO: make this configurable
privateKeyFileContents, err := ioutil.ReadFile("/var/lib/bitbucketserver/private_key.pem")
log.Info("Tried to read the key")
if err != nil {
log.Error(err)