Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pushing back to repository from pipelines (Teams)

pagner@ciena.com April 30, 2019

Regarding this post here: Dec 9th 2018

https://community.atlassian.com/t5/Bitbucket-Pipelines-articles/Pushing-back-to-your-repository/ba-p/958407

There was mention in the comments of a new feature in the works for Teams to be able to push back to the repository (master) from pipelines with no user,ssh key config settings.

Has this been implemented yet? 

If not, what is the work around? From what I have read, SSH has been disabled unless you are on an exclusion list.

We need this feature to sync our master branch on a scheduled pipeline

thanks

1 answer

0 votes
StannousBaratheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 2, 2019

Hi pagner@ciena.com 

Yes this is available now. It works by using a HTTP proxy for GIT so you'll need to use the GIT HTTP URL as opposed to SSH. This is set up by default in your build (which you can see by running `git remote show origin`) but you may need to update 3rd party tooling such as maven if they reference a GIT URL directly.

The HTTP URL is also available via the ${BITBUCKET_GIT_HTTP_ORIGIN} environment variable.

You can of course still use SSH if you prefer but you will need to override the git origin URL back to the SSH one and provide an SSH key in your build.

pagner@ciena.com May 3, 2019

Thanks for the response,

What about branch permissions in play with Teams?

I forgot to mention that part. We of course have branch permissions in place and that is the actual error we are hitting.

By default pipelines is using "bitbucket-pipelines" as the user.  We are receiving a permission denied to update remote origin master

StannousBaratheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 5, 2019

Sorry I missed that detail. Unfortunately branch permissions are not supported by the proxy. You will need to configure SSH as documented.

Like pagner@ciena.com likes this
pagner@ciena.com May 6, 2019

Thanks, are there any plans to implement this feature in the future? Pretty standard configuration as others have pointed out.

Paul

StannousBaratheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 6, 2019

There are yes but the timeframe for it hasn't been determined so I can't make any promises.

It's fairly straight forward to set up SSH in your repo and it'll continue to work indefinitely so you should consider that as the solution for now.

* Create an SSH key in pipelines

* Associate it with a BB user (see https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html) - note you may want to set up a new user for this you can treat as your "pipelines bot user".

* Grant the user write permission on your repo

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events