Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chef git resource fails when local tags differ from remote #12787

Open
digorgonzola opened this issue Apr 14, 2022 · 0 comments
Open

chef git resource fails when local tags differ from remote #12787

digorgonzola opened this issue Apr 14, 2022 · 0 comments
Labels
Status: Good First Issue An issue ready for a new contributor. Type: Bug Does not work as expected.

Comments

@digorgonzola
Copy link

Describe the Enhancement:

Allow a way to pass optional git parameters to the git resource. In our case, since git 2.20, the default behaviour is not to clobber local tags however this causes a sync to fail on a repo of the remote tags have changed.

Describe the Need:

Include a force option that will allow the user to clobber local tags.

Current Alternative

Our hacky way of fixing this is to pass the following environment variable along with the git resource:

git 'some_directory' do
  repository some_repo
  revision master
  action :sync
  environment ({ 'GIT_CONFIG_PARAMETERS' => "'remote.origin.fetch=+refs/tags/*:refs/tags/*'" })
end

Can We Help You Implement This?:

I'm pretty new to ruby and chef but happy to give it a shot!

@digorgonzola digorgonzola added the Status: Untriaged An issue that has yet to be triaged. label Apr 14, 2022
@PrajaktaPurohit PrajaktaPurohit added Status: Good First Issue An issue ready for a new contributor. Type: Bug Does not work as expected. Type: Enhancement Adds new functionality. and removed Status: Untriaged An issue that has yet to be triaged. Type: Enhancement Adds new functionality. labels Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Good First Issue An issue ready for a new contributor. Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

2 participants