Hi:
Using the latest Docker build process and current vyos-1x repo (as of today), I run into a problem with git. The log shows the error:
Could not retrieve information from git: SHA could not be resolved, git returned: b’’
Could not build a version string specific to git branch, falling back to default: git branch could not be determined
If I try git status on the command line before the build, git complains with:
vyos_bld@2716ef9564d0:/vyos$ git status
warning: unable to access ‘/etc/gitconfig’: Is a directory
warning: unable to access ‘/etc/gitconfig’: Is a directory
warning: unable to access ‘/etc/gitconfig’: Is a directory
fatal: unknown error occurred while reading the configuration files
I can’t seem to delete the ‘/etc/gitconfig’ directory to make it a file.
I beleive I figured this out. I deleted the directory named .gitconfig in my user directory and after, when I run the vybld alias command I can use the git commands normally.
The voume mapping was my issue.
Thanks for listening.
I tried the build procedure on a new CentOS installation and this happened again.
When I started there was no .gitconfig item in the home directory. It appeared after I ran the build container with:
It seems if no .gitconfig item is present then the -v option creates a .gitconfig directory to mount.
If I exit and delete the .gticonfig directory and touch a .gitconfig file, git works fine in the container.