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

! [remote rejected] master -> master (pre-receive hook declined) #2952

Closed
2 of 7 tasks
davidhq opened this issue Nov 21, 2017 · 11 comments · Fixed by #3154
Closed
2 of 7 tasks

! [remote rejected] master -> master (pre-receive hook declined) #2952

davidhq opened this issue Nov 21, 2017 · 11 comments · Fixed by #3154
Labels
Milestone

Comments

@davidhq
Copy link

davidhq commented Nov 21, 2017

  • Gitea version (or commit ref):

gitea-1.3-linux-amd64

binary on Debian GNU/Linux 9 (stretch)

  • Git version:
    2.11.0

  • Operating system:

  • Database (use [x]):

    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:

    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

  • I download binary, this version:
~/Install/gitea$ ./gitea-1.3-linux-amd64 --version
Gitea version 4683e54 built with: bindata, sqlite

I ran it with

$ ./gitea-1.3-linux-amd64 web -p 3500
2017/11/21 01:57:20 [T] AppPath: /home/eclipse/Install/gitea/gitea-1.3-linux-amd64
2017/11/21 01:57:20 [T] AppWorkPath: /home/eclipse/Install/gitea
2017/11/21 01:57:20 [T] Custom path: /home/eclipse/Install/gitea/custom
2017/11/21 01:57:20 [T] Log path: /home/eclipse/Install/gitea/log
2017/11/21 01:57:20 Serving [::]:3500 with pid 22540

Then made server reverse proxy on port 80, binding to git.local domain (can be used from macOS)

I then tried to create a new repository on web instance on local network, then trying to push to it according to instructions:

Creating a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin http://git.local/davidhq/test.git
git push -u origin master

I tried multiple combinations and variations of everything, always the same message:

$ git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 216 bytes | 216.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To http://git.local/davidhq/test.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://git.local/davidhq/test.git'

This was the last try: doing it via .local domain, so that really nothing (Cloudflare etc.) is interfering with trying to push to the repo.

Do you have any tips how to solve the problem?

Another question: when I tried to compile gitea, the version is always reported as Gitea version 1.1.0+774-gfd09d1ff, I think it's baked into Makefile because here also for sure I'm compiling the latest commit from master.

Screenshots

@lunny
Copy link
Member

lunny commented Nov 21, 2017

@davidhq I have followed your steps except a reverse proxy. But I cannot reproduce the issue.

➜  testgitea ./gitea-1.3-darwin-10.6-amd64 --version
Gitea version 4683e54 built with: bindata, sqlite

@davidhq
Copy link
Author

davidhq commented Nov 21, 2017

Hi!

I just tried everything locally on my macOS machine, this time it worked, the difference was that I used postgres and not sqlite3.. Not sure if something else too, I will test more and report.

But for now if you can, just let me know why the version in footer is listed as:

Gitea Version: 1.1.0+779-gea78a6db

I ran make in this directory:

david@eclipse:~/go/src/code.gitea.io/gitea (master)$ git log -1
commit ea78a6db5710c630fc3bd2d1d6c9551ea82b39f9 (HEAD -> master, origin/master, origin/HEAD)
Author: Ethan Koenig <ethantkoenig@gmail.com>
Date:   Mon Nov 20 21:43:00 2017 -0800

    Spaces to tabs in templates (#2953)

Shouldn't the version say something more in the direction: 1.3.0+779-ea78a6db

if not, can you let me know what 1.1.0+779-gea78a6db means? thank you

@lunny
Copy link
Member

lunny commented Nov 22, 2017

@davidhq that should be a make file bug.

@lunny lunny added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Nov 22, 2017
@kolaente
Copy link
Member

kolaente commented Nov 22, 2017

I have the same issue with the 1.3 dockerimage, but it does work fine with 1.3.0-rc1

@meoso
Copy link

meoso commented Dec 11, 2017

I recently jumped form gitea-1.0.1-linux-amd64 to gitea-master-linux-amd64 (1.3.0 and 1.3.1) and now have this same problem. reverting to 1.0.1 did not fix.

@lunny
Copy link
Member

lunny commented Dec 11, 2017

@meoso have you renamed the binary name? if not, please rewrite the public key on admin panel.

@lunny lunny added type/bug and removed type/question Issue needs no code to be fixed, only a description on how to fix it yourself. labels Dec 11, 2017
@lunny
Copy link
Member

lunny commented Dec 11, 2017

@davidhq found it. This is because you used -p but LOCAL_URL doesn't change that port.

@lunny lunny added this to the 1.4.0 milestone Dec 11, 2017
@meoso
Copy link

meoso commented Dec 11, 2017

this is what i did:

curl -L -o ~/bin/gitea https://dl.gitea.io/gitea/master/gitea-master-linux-amd64
chmod +x ~/bin/gitea
~/bin/gitea web -p 8080

Admin Panel stats shows 0 public keys, and i clicked "Run" for Rewrite '.ssh/authorized_keys' file

...Now i see your new comments, i suppose i need to wait for the fixed binary?

@lunny
Copy link
Member

lunny commented Dec 11, 2017

You can run without -p parameter but write the port on custom/conf/app.ini. That should work fine.

@meoso
Copy link

meoso commented Dec 11, 2017

thank you, solved mine!

please update https://docs.gitea.io/en-us/install-from-binary/

  1. maybe remove the -p option from the document (unless bugfixed)
  2. maybe reference "master" or a later version instead of https://dl.gitea.io/gitea/1.0.1/gitea-1.0.1-linux-amd64

@MuhammadAbbasi
Copy link

Windows Users can get this problem solved by updating their git bash.
git update-git-for-windows

This worked for me on Windows 10

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants