I am working on bitbucket support for the docker_manager plugin. It does not work well with private repositories.
The plugin works by running the following commands to check the
git rev-parse --short HEAD (local repo latest commit)
git rev-parse --short origin/master (server repo latest commit)
git rev-list --count HEAD..origin/master to fetch the difference in number
The problem is that when I run the command of commit_behind in command line inside docker container plugin repository, I get 0.
But there are actually some commits made in the bitbucket private repository.
When I check locally in my machine, I rightly get the commits_behind number as 2.
I have added the ssh keys in /root/.ssh folder for the bitbucket repo. I am not able to understand why would the git command show 0 inside docker container (incorrect) but 2 in local machine(correct)