Cloning a repository from Bitbucket creating using the 8.19.21-ubi9-jdk17 image results in a warning on the client side

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: master
    • Component/s: Environment - Docker
    • None
    • Severity 3 - Minor

      Issue Summary

      When Bitbucket is launched using the Docker images such as bitbucket:8.19.21-ubi9-jdk17, bitbucket:9.4.13-ubi9-jdk17, etc with either the --user uid:gid(for ex 2003:2003) or --user bitbucket flag, the following warning appears during the repository cloning process from Bitbucket and error when accessing the Bitbucket container logs.

      root@Mirror:~# git clone https://linux-114766.prod.atl-cd.net/bitbucket/scm/pro1/repo5.git
      Cloning into 'repo5'...
      Username for 'https://linux-114766.prod.atl-cd.net': admin
      Password for 'https://admin@linux-114766.prod.atl-cd.net':
      remote: warning: unable to access '/home/default/.config/git/attributes': Permission denied
      remote: Enumerating objects: 3, done.
      remote: Counting objects: 100% (3/3), done.
      remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
      Receiving objects: 100% (3/3), done.
      
      root@fecru:~# sudo docker exec -it bitbucket bash
      bash: /home/default/.bashrc: Permission denied
      

      This behavior is not observed when using the standard image of the same version, such as bitbucket:8.19.21 or bitbucket:9.4.3.

      Steps to Reproduce

      1. Run Bitbucket container using below command:
        docker run -v bitbucketVolume:/var/atlassian/application-data/bitbucket --name="bitbucket" -d -p 7990:7990 -p 7999:7999 --user 2003:2003 atlassian/bitbucket:8.19.21-ubi9-jdk17
        
      1. Clone from Bitbucket:
        root@Mirror:~# git clone https://linux-114766.prod.atl-cd.net/bitbucket/scm/pro1/repo5.git
        Cloning into 'repo5'...
        Username for 'https://linux-114766.prod.atl-cd.net': admin
        Password for 'https://admin@linux-114766.prod.atl-cd.net':
        remote: warning: unable to access '/home/default/.config/git/attributes': Permission denied
        remote: Enumerating objects: 3, done.
        remote: Counting objects: 100% (3/3), done.
        remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
        Receiving objects: 100% (3/3), done.
        

      Expected Results

      The warning message "remote: warning: unable to access '/home/default/.config/git/attributes': Permission denied" should not occur while cloning the repository, and the error "bash: /home/default/.bashrc: Permission denied" should not appear when logging into the Bitbucket container.

      Actual Results

      The warning message "remote: warning: unable to access '/home/default/.config/git/attributes': Permission denied" appears when cloning the repository, and the error "bash: /home/default/.bashrc: Permission denied" occurs when logging into the Bitbucket container.

      Workaround

      • If the default UID and GID 2003:2003 are specified using --user, it's not needed because providing these default values has the same effect as omitting them, as they are the default settings. Since the issue doesn't arise when these values are not specified, it's best to omit them.
      • If the image is rebuilt with a different UID and GID and the issue arises, opt for the default tag of the same image.

            Assignee:
            Unassigned
            Reporter:
            Aman Shrivastava
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: