Failure on push request
Asked by Klaus M?ck:

$ GIT_CURL_VERBOSE=2 git push -u origin --all  
20:41:32.719033 http.c:774 == Info: Couldn't find host abraxas in the .netrc file; using defaults  
20:41:32.729014 http.c:774 == Info: Trying 192.168.0.22:7990...  
20:41:32.730012 http.c:774 == Info: Connected to abraxas (192.168.0.22) port 7990 (#0)  
20:41:32.730012 http.c:721 =\> Send header, 0000000205 bytes (0x000000cd)  
20:41:32.730012 http.c:733 =\> Send header: GET /scm/fit/fitnessstudio.git/info/refs?service=git-receive-pack HTTP/1.1  
20:41:32.730012 http.c:733 =\> Send header: Host: abraxas:7990  
20:41:32.730012 http.c:733 =\> Send header: User-Agent: git/2.30.0.windows.1  
20:41:32.730012 http.c:733 =\> Send header: Accept: \*/\*  
20:41:32.730012 http.c:733 =\> Send header: Accept-Encoding: deflate, gzip, br, zstd  
20:41:32.730012 http.c:733 =\> Send header: Pragma: no-cache  
20:41:32.730012 http.c:733 =\> Send header:  
20:41:32.732507 http.c:774 == Info: Mark bundle as not supporting multiuse  
20:41:32.732507 http.c:721 \<= Recv header, 0000000015 bytes (0x0000000f)  
20:41:32.732507 http.c:733 \<= Recv header: HTTP/1.1 401  
20:41:32.732507 http.c:721 \<= Recv header, 0000000037 bytes (0x00000025)  
20:41:32.732507 http.c:733 \<= Recv header: X-AREQUESTID: @15WRI4Tx1241x16737x0  
20:41:32.732507 http.c:721 \<= Recv header, 0000000023 bytes (0x00000017)  
20:41:32.732507 http.c:733 \<= Recv header: X-ASEN: SEN-L16509716  
20:41:32.732507 http.c:721 \<= Recv header, 0000000033 bytes (0x00000021)  
20:41:32.732507 http.c:733 \<= Recv header: x-xss-protection: 1; mode=block  
20:41:32.732507 http.c:721 \<= Recv header, 0000000029 bytes (0x0000001d)  
20:41:32.732507 http.c:733 \<= Recv header: x-frame-options: SAMEORIGIN  
20:41:32.732507 http.c:721 \<= Recv header, 0000000033 bytes (0x00000021)  
20:41:32.732507 http.c:733 \<= Recv header: x-content-type-options: nosniff  
20:41:32.732507 http.c:721 \<= Recv header, 0000000053 bytes (0x00000035)  
20:41:32.732507 http.c:733 \<= Recv header: WWW-Authenticate: Basic realm="Atlassian Bitbucket"  
20:41:32.732507 http.c:721 \<= Recv header, 0000000028 bytes (0x0000001c)  
20:41:32.732507 http.c:733 \<= Recv header: Transfer-Encoding: chunked  
20:41:32.732507 http.c:721 \<= Recv header, 0000000037 bytes (0x00000025)  
20:41:32.732507 http.c:733 \<= Recv header: Date: Wed, 06 Jan 2021 19:41:01 GMT  
20:41:32.732507 http.c:721 \<= Recv header, 0000000002 bytes (0x00000002)  
20:41:32.732507 http.c:733 \<= Recv header:  
20:41:32.733006 http.c:774 == Info: Connection #0 to host abraxas left intact  
20:41:53.761829 http.c:774 == Info: Connection 0 seems to be dead!  
20:41:53.761829 http.c:774 == Info: Closing connection 0  
20:41:53.762328 http.c:774 == Info: Hostname abraxas was found in DNS cache  
20:41:53.762328 http.c:774 == Info: Trying 192.168.0.22:7990...  
20:41:53.762827 http.c:774 == Info: Connected to abraxas (192.168.0.22) port 7990 (#1)  
20:41:53.762827 http.c:774 == Info: Server auth using Basic with user 'mck'  
20:41:53.762827 http.c:721 =\> Send header, 0000000256 bytes (0x00000100)  
20:41:53.762827 http.c:733 =\> Send header: GET /scm/fit/fitnessstudio.git/info/refs?service=git-receive-pack HTTP/1.1  
20:41:53.762827 http.c:733 =\> Send header: Host: abraxas:7990  
20:41:53.762827 http.c:733 =\> Send header: Authorization: Basic \<redacted\>  
20:41:53.762827 http.c:733 =\> Send header: User-Agent: git/2.30.0.windows.1  
20:41:53.762827 http.c:733 =\> Send header: Accept: \*/\*  
20:41:53.762827 http.c:733 =\> Send header: Accept-Encoding: deflate, gzip, br, zstd  
20:41:53.762827 http.c:733 =\> Send header: Pragma: no-cache  
20:41:53.762827 http.c:733 =\> Send header:  
20:41:53.994387 http.c:774 == Info: Mark bundle as not supporting multiuse  
20:41:53.994387 http.c:721 \<= Recv header, 0000000015 bytes (0x0000000f)  
20:41:53.994387 http.c:733 \<= Recv header: HTTP/1.1 200  
20:41:53.994387 http.c:721 \<= Recv header, 0000000037 bytes (0x00000025)  
20:41:53.994387 http.c:733 \<= Recv header: X-AREQUESTID: @15WRI4Tx1241x16738x0  
20:41:53.994387 http.c:721 \<= Recv header, 0000000023 bytes (0x00000017)  
20:41:53.994387 http.c:733 \<= Recv header: X-ASEN: SEN-L16509716  
20:41:53.994387 http.c:721 \<= Recv header, 0000000014 bytes (0x0000000e)  
20:41:53.994387 http.c:733 \<= Recv header: X-AUSERID: 2  
20:41:53.994387 http.c:721 \<= Recv header, 0000000018 bytes (0x00000012)  
20:41:53.994387 http.c:733 \<= Recv header: X-AUSERNAME: mck  
20:41:53.994387 http.c:721 \<= Recv header, 0000000033 bytes (0x00000021)  
20:41:53.994387 http.c:733 \<= Recv header: x-xss-protection: 1; mode=block  
20:41:53.994387 http.c:721 \<= Recv header, 0000000029 bytes (0x0000001d)  
20:41:53.994387 http.c:733 \<= Recv header: x-frame-options: SAMEORIGIN  
20:41:53.994387 http.c:721 \<= Recv header, 0000000033 bytes (0x00000021)  
20:41:53.994387 http.c:733 \<= Recv header: x-content-type-options: nosniff  
20:41:53.994387 http.c:721 \<= Recv header, 0000000019 bytes (0x00000013)  
20:41:53.994387 http.c:733 \<= Recv header: Content-Length: 0  
20:41:53.994387 http.c:721 \<= Recv header, 0000000037 bytes (0x00000025)  
20:41:53.994387 http.c:733 \<= Recv header: Date: Wed, 06 Jan 2021 19:41:22 GMT  
20:41:53.994387 http.c:721 \<= Recv header, 0000000002 bytes (0x00000002)  
20:41:53.994387 http.c:733 \<= Recv header:  
20:41:53.994387 http.c:774 == Info: Connection #1 to host abraxas left intact  
20:41:53.994387 http.c:774 == Info: Found bundle for host abraxas: 0x3833140 \[serially\]  
20:41:53.994387 http.c:774 == Info: Can not multiplex, even if we wanted to!  
20:41:53.994387 http.c:774 == Info: Re-using existing connection! (#1) with host abraxas  
20:41:53.994387 http.c:774 == Info: Connected to abraxas (192.168.0.22) port 7990 (#1)  
20:41:53.994887 http.c:774 == Info: Server auth using Basic with user 'mck'  
20:41:53.994887 http.c:721 =\> Send header, 0000000226 bytes (0x000000e2)  
20:41:53.994887 http.c:733 =\> Send header: GET /scm/fit/fitnessstudio.git/HEAD HTTP/1.1  
20:41:53.994887 http.c:733 =\> Send header: Host: abraxas:7990  
20:41:53.994887 http.c:733 =\> Send header: Authorization: Basic \<redacted\>  
20:41:53.994887 http.c:733 =\> Send header: User-Agent: git/2.30.0.windows.1  
20:41:53.994887 http.c:733 =\> Send header: Accept: \*/\*  
20:41:53.994887 http.c:733 =\> Send header: Accept-Encoding: deflate, gzip, br, zstd  
20:41:53.994887 http.c:733 =\> Send header: Pragma: no-cache  
20:41:53.994887 http.c:733 =\> Send header:  
20:41:54.017343 http.c:774 == Info: Mark bundle as not supporting multiuse  
20:41:54.017343 http.c:721 \<= Recv header, 0000000015 bytes (0x0000000f)  
20:41:54.017343 http.c:733 \<= Recv header: HTTP/1.1 501  
20:41:54.017343 http.c:721 \<= Recv header, 0000000037 bytes (0x00000025)  
20:41:54.017343 http.c:733 \<= Recv header: X-AREQUESTID: @15WRI4Tx1241x16739x0  
20:41:54.017343 http.c:721 \<= Recv header, 0000000023 bytes (0x00000017)  
20:41:54.017343 http.c:733 \<= Recv header: X-ASEN: SEN-L16509716  
20:41:54.017343 http.c:721 \<= Recv header, 0000000014 bytes (0x0000000e)  
20:41:54.017343 http.c:733 \<= Recv header: X-AUSERID: 2  
20:41:54.017343 http.c:721 \<= Recv header, 0000000018 bytes (0x00000012)  
20:41:54.017343 http.c:733 \<= Recv header: X-AUSERNAME: mck  
20:41:54.017343 http.c:721 \<= Recv header, 0000000033 bytes (0x00000021)  
20:41:54.017343 http.c:733 \<= Recv header: x-xss-protection: 1; mode=block  
20:41:54.017343 http.c:721 \<= Recv header, 0000000029 bytes (0x0000001d)  
20:41:54.017343 http.c:733 \<= Recv header: x-frame-options: SAMEORIGIN  
20:41:54.017343 http.c:721 \<= Recv header, 0000000033 bytes (0x00000021)  
20:41:54.017343 http.c:733 \<= Recv header: x-content-type-options: nosniff  
20:41:54.017343 http.c:721 \<= Recv header, 0000000028 bytes (0x0000001c)  
20:41:54.017343 http.c:733 \<= Recv header: Transfer-Encoding: chunked  
20:41:54.017343 http.c:721 \<= Recv header, 0000000037 bytes (0x00000025)  
20:41:54.017343 http.c:733 \<= Recv header: Date: Wed, 06 Jan 2021 19:41:22 GMT  
20:41:54.017343 http.c:721 \<= Recv header, 0000000019 bytes (0x00000013)  
20:41:54.017343 http.c:733 \<= Recv header: Connection: close  
20:41:54.017343 http.c:721 \<= Recv header, 0000000002 bytes (0x00000002)  
20:41:54.017343 http.c:733 \<= Recv header:  
20:41:54.022334 http.c:774 == Info: Closing connection 1  
20:41:54.234431 http.c:774 == Info: Couldn't find host abraxas in the .netrc file; using defaults  
20:41:54.240918 http.c:774 == Info: Trying 192.168.0.22:7990...  
20:41:54.241417 http.c:774 == Info: Connected to abraxas (192.168.0.22) port 7990 (#0)  
20:41:54.241417 http.c:721 =\> Send header, 0000000193 bytes (0x000000c1)  
20:41:54.241417 http.c:733 =\> Send header: PROPFIND /scm/fit/fitnessstudio.git/ HTTP/1.1  
20:41:54.241417 http.c:733 =\> Send header: Host: abraxas:7990  
20:41:54.241417 http.c:733 =\> Send header: User-Agent: git/2.30.0.windows.1  
20:41:54.241417 http.c:733 =\> Send header: Accept: \*/\*  
20:41:54.241417 http.c:733 =\> Send header: Depth: 0  
20:41:54.241417 http.c:733 =\> Send header: Content-Type: text/xml  
20:41:54.241417 http.c:733 =\> Send header: Content-Length: 176  
20:41:54.241417 http.c:733 =\> Send header: Expect: 100-continue  
20:41:54.241417 http.c:733 =\> Send header:  
20:41:54.241916 http.c:774 == Info: Mark bundle as not supporting multiuse  
20:41:54.241916 http.c:721 \<= Recv header, 0000000015 bytes (0x0000000f)  
20:41:54.241916 http.c:733 \<= Recv header: HTTP/1.1 100  
20:41:54.241916 http.c:774 == Info: We are completely uploaded and fine  
20:41:54.243912 http.c:774 == Info: Mark bundle as not supporting multiuse  
20:41:54.243912 http.c:774 == Info: The requested URL returned error: 501  
20:41:54.243912 http.c:774 == Info: Closing connection 0  
error: Cannot access URL http://abraxas:7990/scm/fit/fitnessstudio.git/, return code 22  
fatal: git-http-push failed  
error: failed to push some refs to 'http://abraxas:7990/scm/fit/fitnessstudio.git'


Answers:
author: Gonchik Tsymzhitov
body: Hi!

please, make sure you can reach out abraxas host.

As *Couldn't find host abraxas in the .netrc file; using defaults*

*Please, check the git remote -v for the all info.*

comments: author: Klaus M?ck
body: Thank you for your answer.

In the message after .netrc warning you can see that abraxas was connected correctly. The authorization step was also done succesfully. The git client is also supported from bitbucket and smart HTTP is part of the git client and server.

$ git remote -v  
origin http://abraxas:7990/scm/fit/fitnessstudio.git (fetch)  
origin http://abraxas:7990/scm/fit/fitnessstudio.git (push)

Do you have any additional ideas?

Thank you!


author: Gonchik Tsymzhitov
body: Hi!

Could you set the ssh url instead of http?

    git remote set-url origin new_url


author: Klaus M?ck
body: Hi,

after a restart of two systems and a new setup of some settings, the error 501 isn't shown anymore.

But now I get the following problem:

$ git push -u origin --all  
Enumerating objects: 4275, done.  
Counting objects: 100% (4275/4275), done.  
Delta compression using up to 8 threads  
Compressing objects: 100% (2372/2372), done.  
Writing objects: 100% (4275/4275), 13.43 MiB \| 2.51 MiB/s, done.  
Total 4275 (delta 3322), reused 2494 (delta 1875), pack-reused 0  
remote: Resolving deltas: 100% (3322/3322), done.  
remote: env: can't execute 'perl': No such file or directory  
To http://abraxas:7990/scm/fit/fitnessstudio.git  
! \[remote rejected\] BugFix-190926 -\> BugFix-190926 (pre-receive hook declined)  
! \[remote rejected\] BugFix-WebCam -\> BugFix-WebCam (pre-receive hook declined)  
\[...\]  
! \[remote rejected\] master -\> master (pre-receive hook declined)  
error: failed to push some refs to 'http://abraxas:7990/scm/fit/fitnessstudio.git'

All hook settings in bitbucket are deactivated.

I think that the perl message comes from the server side. I could not find how to solve this. But I think, it is not the reason of "pre-receive hook declined".

What can I do, or which settings can give a hint?


author: Klaus M?ck
body: I found the solution:

I installed BitBucket on a qnap-Server. I installed also Perl, but BitBucket did not found this installation. An adaption of BitBucket.sh with

export PERL_HOME=\`/sbin/getcfg Perl Install_Path -f ${CONF}\`  
export PATH=$QPKG_ROOT/bin:$PERL_HOME/perl/bin:$PATH

and a restart of BitBucket was successful. Now the push is functionally.


Tags: bitbucket-server

server