Giter Club home page Giter Club logo

puppet-git's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

puppet-git's Issues

Could not find dependency error

I'm trying to use puppet as my vagrant VM provision and use this module to clone a certain git repo and I keep getting this error:
Could not find dependency Exec[git_repo_hub] for Exec[git_hub_co_branch] at /tmp/vagrant-puppet/modules-0/git/manifests/repo.pp:81

With this in my manifest:

class { 'git':
  gui => false,
  svn => false,
}

git::repo { 'hub':
  path => '/home/vagrant/code/sandbox/hub',
  source => 'https://github.com/defunkt/hub.git',
}

Am I missing something here?

Allow separate $title and $user for git::user

Currently can't alias git::user instances using the form:

git::user{'a_convenient_alias':
  $name => $some_var,
  $user_name => "Long Name",
  $user_email => "${some_var}@example.org",
}

Consider supporting read/write git URLs

I notice in the readme it says this:

It is strongly recommended that read-only git URIs are used.

However, it doesn't explain why. We have a use case for doing read/write checkouts so users can contribute back to the projects.

Would you consider looking at a pull request for read/write URLs? If not, can you explain why in the readme?

Thanks much

git::config define error

include git
git::config { 'core.excludesfile':
    value    => "/opt/svn/tutu-tools/git/.gitignore",
    provider => 'system',
}

produces

Error: /usr/bin/git config --system core.excludesfile '/opt/svn/tutu-tools/git/.gitignore' returned 128 instead of one of [0]
Error: /Stage[main]/Git::Config[core.excludesfile]/Exec[git_config_core.excludesfile]/returns: change from notrun to 0 failed: /usr/bin/git config --system core.excludesfile '/opt/svn/tutu-tools/git/.gitignore' returned 128 instead of one of [0]

git::install fails in Ubuntu 10.04

The package name apt needs is actually git-core here.

err: /Stage[main]/Git::Install/Package[git]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install git' returned 100: Reading package
 lists...
Building dependency tree...
Reading state information...
Package git is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package git has no installation candidate

git::config define is not functional

my code:

$title = username
git::config { "set user.name for ${title}":
  value   => $git_user_name,
  config  => 'user.name',
  user    => $title,
  provider => 'global',
  require =>  [ User[$title], Group[$group] ],
}

produces error:

Error: /Stage[main]/users::Others/users::Add[perfilov]/Git::Config[set user.name for perfilov]/Exec[git_config_set user.name for perfilov]: Could not evaluate: Could not find command ''

centos 6.6
puppet-3.7.4-1.el6.noarch

/bin/su ${name} doesn't switch to user's environment

In user.pp, lines 36-44, the various su commands do not assume the target user's environment (at least on CentOS and RHEL). A hyphen after su solves this issue by spawning a shell.

example:

    command => "/bin/su ${name} -c '${git::params::bin} config --global user.name \"${git_name}\"'",

vs

    command => "/bin/su - ${name} -c '${git::params::bin} config --global user.name \"${git_name}\"'",

git::repo -l flag in su cause issue

I ran in the following issue:

Notice: /Stage[main]/Main/Git::Repo[gitolite-admin]/Exec[git_gitolite-admin_co_branch]/returns: fatal: This operation must be run in a work tree
Error: /bin/su -l git -c "/usr/bin/git checkout master" returned 128 instead of one of [0]
Error: /Stage[main]/Main/Git::Repo[gitolite-admin]/Exec[git_gitolite-admin_co_branch]/returns: change from notrun to 0 failed: /bin/su -l git -c "/usr/bin/git checkout master" returned 128 instead of one of [0]

Caused by the following code:

git::repo { 'gitolite-admin':
  path    => "${gitolite3::params::gt_repo_base}/gitolite-admin",
  source  => "${gitolite3::params::gt_repo_dir}/gitolite-admin",
  owner   => $gitolite3::params::gt_uid,
  group   => $gitolite3::params::gt_gid,
  update  => true,
  branch  => master,
}

Removing the -l flag solves the issue.

Cannot alias Package[git] to ["git-core"]

I went to spool up a Vagrant box today that I built using PuPHPet (and tweaked a bit), and it returns the following error:

Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Cannot alias Package[git] to ["git-core"] at /etc/puppet/modules/git/manifests/init.pp:54; resource ["Package", "git-core"] already declared at /etc/puppet/modules/git/manifests/init.pp:54 on node debian-70rc1-x64-vbox4210.vagrantup.com
Wrapped exception:
Cannot alias Package[git] to ["git-core"] at /etc/puppet/modules/git/manifests/init.pp:54; resource ["Package", "git-core"] already declared
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Cannot alias Package[git] to ["git-core"] at /etc/puppet/modules/git/manifests/init.pp:54; resource ["Package", "git-core"] already declared at /etc/puppet/modules/git/manifests/init.pp:54 on node debian-70rc1-x64-vbox4210.vagrantup.com
No error message

My Puppetfile is (to the best of my knowledge) retrieving your Git module using mod 'git', :git => 'git://github.com/nesi/puppet-git.git', so I can only assume that your recent changes have somehow affected this. I haven't spooled up this box for a few days, and it has worked perfectly fine up until now.

Apologies if I'm wrong in my assumptions, and for providing little detail (I didn't want to paste every config file I have, since PuPHPet generates quite a few of them). If I can answer any questions or if you have any thoughts, I'd love to hear them. I'll continue investigating this myself when I have a spare moment, but for now, work beckons! :)

timeout variable

Hi, I would suggest to add the ability of passing timeout to repo cloning class, as it is set to 600 seconds now, hardcoded.

$HOME not set on centos 6.3 vm

Having a problem installing a user with your plugin. It seems the user's environment is not setup. Any idea how to work around the problem?

Debug: Execjenkins_git_name: Executing check '/usr/bin/git config --global user.name|/bin/grep 'jenkins''

Debug: Executing '/usr/bin/git config --global user.name|/bin/grep 'jenkins''
Debug: /Stage[main]/Ops_ui/Git::User[jenkins]/Exec[jenkins_git_name]/unless: fatal: $HOME not set

Debug: Execjenkins_git_name: Executing '/usr/bin/git config --global user.name 'jenkins''

Debug: Executing '/usr/bin/git config --global user.name 'jenkins''

Notice: /Stage[main]/Ops_ui/Git::User[jenkins]/Exec[jenkins_git_name]/returns: fatal: $HOME not set

Error: /usr/bin/git config --global user.name 'jenkins' returned 128 instead of one of [0]

Error: /Stage[main]/Ops_ui/Git::User[jenkins]/Exec[jenkins_git_name]/returns: change from notrun to 0 failed: /usr/bin/git config --global user.name 'jenkins' returned 128 instead of one of [0]

Rename Class Git to something else

Hi,

We already have a module git that installs the client for linux and windows. Is it possible to rename the module to something different. Like "gitget or nesigit".

I guess i will have to do it manually for now..

`git::repo` does not update remote URL if it changes.

If you change a git::repo source parameter, e.g.

git::repo{'foo':
  path    => '/usr/src/foo,
  source  => 'git://github.com/me/foo.git',
}

to

git::repo{'foo':
  path    => '/usr/src/foo,
  source  => 'git://github.com/you/foo.git',
}

And does nothing.

While doing the same and changing the branch (iff the new branch does not exist on the old remote):

git::repo{'foo':
  path    => '/usr/src/foo,
  source  => 'git://github.com/me/foo.git',
  branch  => 'master',
}

to

git::repo{'foo':
  path    => '/usr/src/foo,
  source  => 'git://github.com/you/foo.git',
  branch  => 'baa',
}

results in the error:

Error: /usr/bin/git checkout baa returned 1 instead of one of [0]
Error: /Stage[main]/Puppetdashboard::Install/Git::Repo[puppet-dashboard]/Exec[git_puppet-dashboard_co_branch]/returns: change from notrun to 0 failed: /usr/bin/git checkout baa returned 1 instead of one of [0]

...well because the baa branch doesn't exist.

${target} should probably be ${path}

No patch, but in manifests/repo.pp lines 44-48

    if $bare {
      $init_cmd = "${git::params::bin} init --bare ${target}"
    } else {
      $init_cmd = "${git::params::bin} init ${target}"
    }

If ${target} is a magic variable or gets set elsewhere, I can't find it. I think ${path} is what is needed there but I'm not entirely sure.

git::config define error

include git
git::config { 'core.excludesfile':
    value    => "/opt/svn/tutu-tools/git/.gitignore",
    user     => 'root',
    provider => 'system',
}

produces error

Warning: Exec[git_config_core.excludesfile](provider=posix): Cannot understand environment setting "HOME="

git_tag potentailly does not work

I am using the following puppet code:

class{git:
  svn => false,
  gui => false,
}

class cgit {
  git::repo{'cgit':
    path    => '/usr/local/src/cgit',
    source  => 'git://git.zx2c4.com/cgit',
    git_tag => 'v0.9.1',
  }

}

I am expecting this to clone the repo and check out the tag `v0.9.1`` But when
I go to check which version is actually checked out I see:

root@precise32:/usr/local/src/cgit# git describe
v0.9.1-88-g7966fd9

And not:

root@precise32:/usr/local/src/cgit# git describe
v0.9.1

Any ideas? Or is it an error on my part (am new to puppet).

puppet-git doesn't appear to honor --noop

I just did a test run using --noop (I am running masterless puppet), and for some reason the git repo was still cloned.

I am using 2.6.12 which I admit is a little old.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.