Open maestrow opened 3 years ago
+1 We are experiencing this exact issue as well.
any solution for this?
I am facing the same issue described here.
I Have this resource:
resources:
- name: concourse-adapter
type: git
icon: git
source:
uri: https://seed.radicle.gr/z2woyw9Get9Q21VJzdbVz33b47xDb.git
git_config:
- name: safe.directory
value: /tmp/build/get
- name: remote.origin.fetch
value: "+refs/*:refs/remotes/origin/*"
- name: fetch.all
value: true
and in my task I have these commands:
run:
path: sh
args:
- -c
- |
cd concourse-adapter
ls -al ~/
ls -al /root
echo $(git config --list)
echo $(git config --list --global)
cat ~/.gitconfig
The output indicates that there is no global configuration - only the local :
total 20
drwx------ 2 root root 4096 Apr 9 05:58 .
drwxr-xr-x 1 root root 4096 Apr 19 05:00 ..
-rw-r--r-- 1 root root 571 Apr 10 2021 .bashrc
-rw-r--r-- 1 root root 161 Jul 9 2019 .profile
total 20
drwx------ 2 root root 4096 Apr 9 05:58 .
drwxr-xr-x 1 root root 4096 Apr 19 05:00 ..
-rw-r--r-- 1 root root 571 Apr 10 2021 .bashrc
-rw-r--r-- 1 root root 161 Jul 9 2019 .profile
core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.origin.url=https://seed.radicle.gr/z2woyw9Get9Q21VJzdbVz33b47xDb.git remote.origin.fetch=+refs/heads/main:refs/remotes/origin/main branch.main.remote=origin branch.main.merge=refs/heads/main
fatal: unable to read config file '/root/.gitconfig': No such file or directory
cat: /root/.gitconfig: No such file or directory
Has anyone solved this issue somehow?
Maybe @nosdod could share the steps to set it up at it seems that it somehow worked at this issue: https://github.com/concourse/git-resource/issues/383
Can you provide the resource configuration that you set up the git_config ?
It looks like /root/.gitconfig
is updated but you will only see the modifications within the get step. You can use the hijack
fly CLI subcommand to inspect the container used in the get step and see that the modifications are made there. I guess that since this configuration is not placed in the output directory, future steps do not see that file. This is probably useful for some config options that affect how git clones repositories like those used in #383. Perhaps it would be wise to also update the local config settings in the repository as well after it is cloned as part of the in
script so that future steps can use those configs.
I have
git_config
option in git resource. And no one option seems to be applied.How to reproduce
Assume the following pipeline config saved to
git-config.yml
:Set this pipeline:
fly -t tutorial set-pipeline -p git_config -c git-config.yml
. Then triggerfly -t tutorial trigger-job -j git_config/git_config_job --watch
.Actual result
What we see in output:
The most important part is
/root/.gitconfig: No such file or directory
.Expected result
/root/.gitconfig
file exists. I expect that because all global git settings stores in this file. My use case shows that this file doesn't exists. And as a result git hasn't any global settings.