#182  ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to
Closed
dox opened 4 years ago

Not trying to do anything fancy, no hooks defined Just want to git my code.

I created new project and did the following:

git init
git remote add origin [URL]
git add .
git commit -m "initial commit"
git push -u origin master
remote: Resolving deltas: 100% (5/5), done.
To [URL]
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://URL/Project'

Is there anything I need to do once creating a new project within OneDev? I've not found anything in docemmtation about this error.

Robin Shen changed fields 4 years ago
Name Previous Value Current Value
Type
Support Request
Bug
Seen Builds
empty
880
Robin Shen commented 4 years ago

It turns out that OpenBSD does not have bash installed by default. To work around the issue, please run below commands:

sudo dpkg install bash
sudo ln -s /usr/local/bin/bash /bin/bash
Robin Shen commented 4 years ago

Sorry should be:

sudo pkg install bash
sudo ln -s /usr/local/bin/bash /bin/bash
dox commented 4 years ago

Thank you, that worked ish; as it did do something this time. However whatever it does with curl kind of broke. Not out of memory.

Writing objects: 100% (164/164), 30.46 MiB | 7.77 MiB/s, done.
Total 164 (delta 5), reused 0 (delta 0)
remote: Resolving deltas: 100% (5/5), done.
remote: curl: option --data-urlencode: out of memory
remote: curl: try 'curl --help' for more information
To projectUrl
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
Robin Shen commented 4 years ago

Not sure why this is happening. Works on Linux/Windows/Mac fine (Never tested on FreeBSD before)

Robin Shen commented 4 years ago
dox commented 4 years ago

Well after testing, the repo updates, revisions appears to work without the curl part. So not sure what that's about however I've recompiled curl to the latest version cloned from github, but no show.

curl 7.72.0-DEV (amd64-unknown-freebsd11.2) libcurl/7.72.0-DEV OpenSSL/1.0.2o zlib/1.2.11
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets

This devbox is FreeBSD11.2 rather then 12.1, it could be that but not sure it is.

Robin Shen commented 4 years ago

Will it still report "out of memory" if you push a new repository?

dox commented 4 years ago

Aye it does.

remote: curl: option --data-urlencode: out of memory
remote: curl: try 'curl --help' for more information
To http://x.x.x.x:6610/TestRepo
Robin Shen commented 4 years ago

Please specify path to your compiled curl via "Administration / System Setting". I just tested with the compiled version and the out of memory issue is fixed.

dox commented 4 years ago

Same error.

Maybe this is another strange 12.0 issue, I'll see if I can get my devbox upgraded.

Robin Shen commented 4 years ago

Forget to mention: I am compiling curl from 7.71.1 tag instead of master.

dox commented 4 years ago

No luck here,

curl 7.71.1-DEV (amd64-unknown-freebsd11.2) libcurl/7.71.1-DEV OpenSSL/1.0.2o zlib/1.2.11
Release-Date: [unreleased]

I'll upgrade my release and see if that fixes it like the last. Very weird.

dox commented 4 years ago

Upgraded to 12.1 -- No luck.

curl 7.71.1-DEV (amd64-unknown-freebsd12.1) libcurl/7.71.1-DEV OpenSSL/1.1.1d zlib/1.2.11
Total 8 (delta 7), reused 0 (delta 0), pack-reused 0
remote: curl: option --data-urlencode: out of memory
remote: curl: try 'curl --help' for more information
To http://10.0.0.19:6610/NeonCrystal
   0d00b4b..d197f87  alpha -> alpha

If it working for you and not myself, then I expect something is more broken with devbox. And I've had no other issues with that error appeariing either.

Robin Shen commented 4 years ago

This error will cause OneDev unable to notify commit events, including indexing, closing issues based on commit messages, etc.

Versions of curl and its libs are the same as mine. Please double check if OneDev is actually using this curl by examining OneDev system setting.

dox commented 4 years ago

My bad, I had updated Curl on my dev box which I commit from, not the curl on the box which OneDev runs on.

All working good now. No errors on commits.

FYI I had no issues with referring to issues in git commits, very cool. Thanks.

Robin Shen changed state to 'Closed' 4 years ago
Previous Value Current Value
Open
Closed
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Affected Versions
Not Found
Issue Votes (0)
Watchers (3)
Reference
onedev/server#182
Please wait...
Page is in error, reload to recover