Bitbucket Server Pull Request

So here is my situation and hopefully someone can clarify my thought process:

  1. I have a private bitbucket server
  2. I have a user who has only read-access
  3. He makes a new local branch, does his work, now he is ready for a pull request

  4. Could not resolve host: bitbucket.org; nodename nor servname provided, or not known
  5. Use own username/password with git and bitbucket
  6. Git: Forget about upstream repo
  7. Proper way to release in Git with submodules
  8. Bitbucket 5.0.0 is not compatible with git 2.14.0
  9. Which are the pros (and cons) of self-hosting your repositories (in other words: GitLab vs Bitbucket)?
  10. Error: Bitbucket create pull request needs two branches on the same repo to do its pull request but the “dev” cannot push his branch since
    he has only read-access not write access

My question, how can I create a pull request using Bitbucket to
A, send this local branch to be reviewed by my team
B, and I want to have this “dev” to only have read-access?

  • GitHub: How to send one pull request per separate commit?
  • Maven release:prepare unable to commit to Git repository when using a CI
  • Can I disable git pull?
  • How to make Head point to master in git?
  • Git mirror repository using two remotes
  • JGit http clone repository but the repository can't pull
  • One Solution collect form web for “Bitbucket Server Pull Request”

    Solution 1 Handle branches permissions

    I suggest you create the branch in the bitbucket server first, with writing permissions (this is normally done using Jira, so you can assign a task ID to the branch).

    To handle branches and permissions check this guide. You can define a pattern with associated permissions so certain branches automatically adopt those properties.

    Then the user would do

    $ git fetch origin
    $ git checkout feature/taskID-whatever
    

    After developing he would be able to push the branch, and perform a pull request to develop.

    $ git push origin feature/taskID-whatever
    

    Develop must be only read, but branches not.

    Solution 2 Use fork

    In the same tutorial you are following you will find how to do a fork. This way your developer will have a clone in his own bitbucket repository.

    Git Baby is a git and github fan, let's start git clone.