diff --git a/remote/bitbucketserver/bitbucketserver.go b/remote/bitbucketserver/bitbucketserver.go index 3880476a1..db7153a4a 100644 --- a/remote/bitbucketserver/bitbucketserver.go +++ b/remote/bitbucketserver/bitbucketserver.go @@ -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") diff --git a/remote/bitbucketserver/client.go b/remote/bitbucketserver/client.go index 7604d1d47..2f9349eba 100644 --- a/remote/bitbucketserver/client.go +++ b/remote/bitbucketserver/client.go @@ -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)