mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-05 07:08:41 +00:00
moving the private key out of root and into a more sensical location till it's configurable
This commit is contained in:
parent
b89b7cff5b
commit
16ddb75d08
2 changed files with 5 additions and 4 deletions
|
@ -6,9 +6,9 @@ package bitbucketserver
|
||||||
// Configure application links in the bitbucket server --
|
// Configure application links in the bitbucket server --
|
||||||
// application url needs to be the base url to drone
|
// 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)
|
// 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/
|
// 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
|
// 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)
|
client, err := c.MakeHttpClient(accessToken)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.error(err)
|
log.Error(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
response, err := client.Get(bs.URL + "/plugins/servlet/applinks/whoami")
|
response, err := client.Get(bs.URL + "/plugins/servlet/applinks/whoami")
|
||||||
|
|
|
@ -12,7 +12,8 @@ import (
|
||||||
|
|
||||||
|
|
||||||
func NewClient(ConsumerKey string, URL string) *oauth.Consumer{
|
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")
|
log.Info("Tried to read the key")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
|
|
Loading…
Reference in a new issue