vivin / gradle-semantic-build-versioning

Gradle plugin to generate version-numbers and tags using semantic versioning
MIT License
86 stars 32 forks source link

Having problem to run gradle build in command line #33

Closed brolinuk closed 7 years ago

brolinuk commented 7 years ago

I keep having this error message when I try to run the gradle build using command line, while no issues at all using IntelliJ

What went wrong: A problem occurred evaluating root project 'xxxxx'. Failed to apply plugin [id 'net.vivin.gradle-semantic-build-versioning'] > Unable to find Git repository: Systen wide config file /usr/local/git/etc/gitconfig is invalid org.eclipse.jgit.errors.ConfigInvalidException: Cannot read file /usr/local/git/etc/gitconfig

The repository has been specified in the build.gradle file and build works fine with intelliJ.

maven {
            url "https://plugins.gradle.org/m2/"
}

I am not sure why it tries to check the gitconfig file and why it failed when I try to run it in command line

Thanks in advance

vivin commented 7 years ago

It looks like it may have to do with how git is configured on your system. Have you tried googling that error?

brolinuk commented 7 years ago

I did, but unfortunately, I can't get any useful info.

If I comment out the use of this plugin, it will build fine :(

vivin commented 7 years ago

The plugin uses git to figure out the current tags on your repo. Have you looked at the contents of /usr/local/git/etc/gitconfig?

brolinuk commented 7 years ago

I have never changed this file and its permitted to read and write to everyone. I don't see anything wrong with it. Thanks

` [core] excludesfile = ~/.gitignore legacyheaders = false # >git 1.5 quotepath = false

# http://stackoverflow.com/questions/136178/git-diff-handling-long-lines
pager = less -r
# if ↑ doesn’t work, try: pager = less -+$LESS -FRX

[user]

name = your name

email = your@name

[mergetool] keepBackup = true

[push] default = simple # [ matching | simple ]

[color] ui = auto interactive = auto

[repack] usedeltabaseoffset = true # >git 1.5

[alias] s = status a = !git add . && git status au = !git add -u . && git status aa = !git add . && git add -u . && git status c = commit cm = commit -m ca = commit --amend # careful ac = !git add . && git commit acm = !git add . && git commit -m l = log --graph --all --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset' ll = log --stat --abbrev-commit lg = log --color --graph --pretty=format:'%C(bold white)%h%Creset -%C(bold green)%d%Creset %s %C(bold green)(%cr)%Creset %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative llg = log --color --graph --pretty=format:'%C(bold white)%H %d%Creset%n%s%n%+b%C(bold blue)%an <%ae>%Creset %C(bold green)%cr (%ci)' --abbrev-commit d = diff master = checkout master spull = svn rebase spush = svn dcommit alias = !git config --list | grep 'alias.' | sed 's/alias.([^=])=(.)/\1\t => \2/' | sort

[include] # as of 1.7.10 https://github.com/git/git/commit/9b25a0b52e09400719366f0a33d0d0da98bbf7b0 path = ~/.gitcinclude path = .githubconfig path = .gitcredential

[github]

user =

token =

[diff]

git does copy/rename detection. if you want it to track copies/renames:

# http://stackoverflow.com/questions/1043388/record-file-copy-operation-with-git
# renames = copies

[diff "exif"] textconv = exif [credential] helper = osxkeychain `

vivin commented 7 years ago

That is is indeed a strange error. I am not sure what could be causing it. You said that building from the IDE works?

brolinuk commented 7 years ago

Yes, works fine with IntelliJ

vivin commented 7 years ago

@brolinuk Were you able to figure this out?

brolinuk commented 7 years ago

I solved this out by deleting the config file. Not ideal but does the job. Thanks