How to resolve “GitLab: API is not accessible” when pushing to a new repository? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!remote: GitLab: API is not accessibleRemote: GitLab: API is not accessible when trying to push commitError 401 when pushing to Git (GitLab)Configure GitLab repository in JenkinsPassword prompt when pushing git repository on localhost (gitlab)configuring gitlab project for https accessGitlab 7.8.4 unable to push with SSH or HTTPSGIT-Unable to push to remote repositoryHow to setup Gitlab hook to validate a git push to remoteGitlab Error 502 when trying to pull/pushPushing to the repository created by Gitlab fails with errorPush a local project to new gitlab repo

Do wooden building fires get hotter than 600°C?

An adverb for when you're not exaggerating

What is the home of the drow in Flanaess?

Concentration's Meaning

How much damage would a cupful of neutron star matter do to the Earth?

Is there any word for a place full of confusion?

Trademark violation for app?

Customizing QGIS plugins

Google .dev domain strangely redirects to https

How does light 'choose' between wave and particle behaviour?

How many time has Arya actually used Needle?

How could we fake a moon landing now?

If Windows 7 doesn't support WSL, then what is "Subsystem for UNIX-based Applications"?

How do I find out the mythology and history of my Fortress?

What would you call this weird metallic apparatus that allows you to lift people?

How can I prevent/balance waiting and turtling as a response to cooldown mechanics

Why can't I install Tomboy in Ubuntu Mate 19.04?

A term for a woman complaining about things/begging in a cute/childish way

How did Fremen produce and carry enough thumpers to use Sandworms as de facto Ubers?

Amount of permutations on an NxNxN Rubik's Cube

Random body shuffle every night—can we still function?

Can a Beast Master ranger change beast companions?

What makes a man succeed?

How were pictures turned from film to a big picture in a picture frame before digital scanning?



How to resolve “GitLab: API is not accessible” when pushing to a new repository?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!remote: GitLab: API is not accessibleRemote: GitLab: API is not accessible when trying to push commitError 401 when pushing to Git (GitLab)Configure GitLab repository in JenkinsPassword prompt when pushing git repository on localhost (gitlab)configuring gitlab project for https accessGitlab 7.8.4 unable to push with SSH or HTTPSGIT-Unable to push to remote repositoryHow to setup Gitlab hook to validate a git push to remoteGitlab Error 502 when trying to pull/pushPushing to the repository created by Gitlab fails with errorPush a local project to new gitlab repo



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








17















we have a locally-hosted Enterprise Edition of GitLab at my place of employment (currently at v7.12.00-ee ceb5083). I can create a repository through the GUI without issue. But when I try to add anything to the repository, I get this error:



D:wstesting [master]> git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 219 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: API is not accessible
To http://gitlab.ops.cld/duffrw/testing.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://gitlab.ops.cld/duffrw/testing.git'


I see in the /var/log/gitlab/gitlab-shell/gitlab-shell.log file that the API isn't responding, and is giving an "Internal Server Error":



E, [2015-07-22T16:05:51.812454 #15110] ERROR -- : API call <POST http://127.0.0.1:8080/api/v3/internal/allowed> failed: 500 => <"message":"500 Internal Server Error">.


A few questions... Where can I go from here? There must some sort of service provider that isn't running. Why not? What's it called? How do I start it?



I checked in /var/log/gitlab/nginx/gitlab_access.log and found these lines, but I didn't see anything interesting:



172.31.201.164 - - [22/Jul/2015:16:05:50 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 401 0 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - - [22/Jul/2015:16:05:50 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 401 0 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - duffrw [22/Jul/2015:16:05:51 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 200 179 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - duffrw [22/Jul/2015:16:05:51 +0000] "POST /duffrw/testing.git/git-receive-pack HTTP/1.1" 200 124 "-" "git/1.9.5.msysgit.1"


There aren't any errors for the push of this repository in /var/log/gitlab/nginx/gitlab_error.log and /var/log/gitlab/nginx/error.log is completely empty.



What am I missing?



Update:



Using the gitlab-ctl tail command is very handy! It revealed a stack trace, which I sent to GitLab and they told me that this was a bug in 7.12.00. It is fixed in 7.13.00.










share|improve this question
























  • were you able to solve it? I have the same error in the same version.

    – RayofCommand
    Aug 5 '15 at 7:55






  • 1





    @RayofCommand, yes I did. I talked to support and they fixed me up. I had to turn off Git Hooks temporarily until I pushed, at which point I turned the hooks back on.

    – Duff
    Aug 6 '15 at 16:54

















17















we have a locally-hosted Enterprise Edition of GitLab at my place of employment (currently at v7.12.00-ee ceb5083). I can create a repository through the GUI without issue. But when I try to add anything to the repository, I get this error:



D:wstesting [master]> git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 219 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: API is not accessible
To http://gitlab.ops.cld/duffrw/testing.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://gitlab.ops.cld/duffrw/testing.git'


I see in the /var/log/gitlab/gitlab-shell/gitlab-shell.log file that the API isn't responding, and is giving an "Internal Server Error":



E, [2015-07-22T16:05:51.812454 #15110] ERROR -- : API call <POST http://127.0.0.1:8080/api/v3/internal/allowed> failed: 500 => <"message":"500 Internal Server Error">.


A few questions... Where can I go from here? There must some sort of service provider that isn't running. Why not? What's it called? How do I start it?



I checked in /var/log/gitlab/nginx/gitlab_access.log and found these lines, but I didn't see anything interesting:



172.31.201.164 - - [22/Jul/2015:16:05:50 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 401 0 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - - [22/Jul/2015:16:05:50 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 401 0 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - duffrw [22/Jul/2015:16:05:51 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 200 179 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - duffrw [22/Jul/2015:16:05:51 +0000] "POST /duffrw/testing.git/git-receive-pack HTTP/1.1" 200 124 "-" "git/1.9.5.msysgit.1"


There aren't any errors for the push of this repository in /var/log/gitlab/nginx/gitlab_error.log and /var/log/gitlab/nginx/error.log is completely empty.



What am I missing?



Update:



Using the gitlab-ctl tail command is very handy! It revealed a stack trace, which I sent to GitLab and they told me that this was a bug in 7.12.00. It is fixed in 7.13.00.










share|improve this question
























  • were you able to solve it? I have the same error in the same version.

    – RayofCommand
    Aug 5 '15 at 7:55






  • 1





    @RayofCommand, yes I did. I talked to support and they fixed me up. I had to turn off Git Hooks temporarily until I pushed, at which point I turned the hooks back on.

    – Duff
    Aug 6 '15 at 16:54













17












17








17


2






we have a locally-hosted Enterprise Edition of GitLab at my place of employment (currently at v7.12.00-ee ceb5083). I can create a repository through the GUI without issue. But when I try to add anything to the repository, I get this error:



D:wstesting [master]> git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 219 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: API is not accessible
To http://gitlab.ops.cld/duffrw/testing.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://gitlab.ops.cld/duffrw/testing.git'


I see in the /var/log/gitlab/gitlab-shell/gitlab-shell.log file that the API isn't responding, and is giving an "Internal Server Error":



E, [2015-07-22T16:05:51.812454 #15110] ERROR -- : API call <POST http://127.0.0.1:8080/api/v3/internal/allowed> failed: 500 => <"message":"500 Internal Server Error">.


A few questions... Where can I go from here? There must some sort of service provider that isn't running. Why not? What's it called? How do I start it?



I checked in /var/log/gitlab/nginx/gitlab_access.log and found these lines, but I didn't see anything interesting:



172.31.201.164 - - [22/Jul/2015:16:05:50 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 401 0 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - - [22/Jul/2015:16:05:50 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 401 0 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - duffrw [22/Jul/2015:16:05:51 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 200 179 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - duffrw [22/Jul/2015:16:05:51 +0000] "POST /duffrw/testing.git/git-receive-pack HTTP/1.1" 200 124 "-" "git/1.9.5.msysgit.1"


There aren't any errors for the push of this repository in /var/log/gitlab/nginx/gitlab_error.log and /var/log/gitlab/nginx/error.log is completely empty.



What am I missing?



Update:



Using the gitlab-ctl tail command is very handy! It revealed a stack trace, which I sent to GitLab and they told me that this was a bug in 7.12.00. It is fixed in 7.13.00.










share|improve this question
















we have a locally-hosted Enterprise Edition of GitLab at my place of employment (currently at v7.12.00-ee ceb5083). I can create a repository through the GUI without issue. But when I try to add anything to the repository, I get this error:



D:wstesting [master]> git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 219 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: API is not accessible
To http://gitlab.ops.cld/duffrw/testing.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://gitlab.ops.cld/duffrw/testing.git'


I see in the /var/log/gitlab/gitlab-shell/gitlab-shell.log file that the API isn't responding, and is giving an "Internal Server Error":



E, [2015-07-22T16:05:51.812454 #15110] ERROR -- : API call <POST http://127.0.0.1:8080/api/v3/internal/allowed> failed: 500 => <"message":"500 Internal Server Error">.


A few questions... Where can I go from here? There must some sort of service provider that isn't running. Why not? What's it called? How do I start it?



I checked in /var/log/gitlab/nginx/gitlab_access.log and found these lines, but I didn't see anything interesting:



172.31.201.164 - - [22/Jul/2015:16:05:50 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 401 0 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - - [22/Jul/2015:16:05:50 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 401 0 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - duffrw [22/Jul/2015:16:05:51 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 200 179 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - duffrw [22/Jul/2015:16:05:51 +0000] "POST /duffrw/testing.git/git-receive-pack HTTP/1.1" 200 124 "-" "git/1.9.5.msysgit.1"


There aren't any errors for the push of this repository in /var/log/gitlab/nginx/gitlab_error.log and /var/log/gitlab/nginx/error.log is completely empty.



What am I missing?



Update:



Using the gitlab-ctl tail command is very handy! It revealed a stack trace, which I sent to GitLab and they told me that this was a bug in 7.12.00. It is fixed in 7.13.00.







gitlab






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 22 '15 at 19:01







Duff

















asked Jul 22 '15 at 17:01









DuffDuff

7111714




7111714












  • were you able to solve it? I have the same error in the same version.

    – RayofCommand
    Aug 5 '15 at 7:55






  • 1





    @RayofCommand, yes I did. I talked to support and they fixed me up. I had to turn off Git Hooks temporarily until I pushed, at which point I turned the hooks back on.

    – Duff
    Aug 6 '15 at 16:54

















  • were you able to solve it? I have the same error in the same version.

    – RayofCommand
    Aug 5 '15 at 7:55






  • 1





    @RayofCommand, yes I did. I talked to support and they fixed me up. I had to turn off Git Hooks temporarily until I pushed, at which point I turned the hooks back on.

    – Duff
    Aug 6 '15 at 16:54
















were you able to solve it? I have the same error in the same version.

– RayofCommand
Aug 5 '15 at 7:55





were you able to solve it? I have the same error in the same version.

– RayofCommand
Aug 5 '15 at 7:55




1




1





@RayofCommand, yes I did. I talked to support and they fixed me up. I had to turn off Git Hooks temporarily until I pushed, at which point I turned the hooks back on.

– Duff
Aug 6 '15 at 16:54





@RayofCommand, yes I did. I talked to support and they fixed me up. I had to turn off Git Hooks temporarily until I pushed, at which point I turned the hooks back on.

– Duff
Aug 6 '15 at 16:54












7 Answers
7






active

oldest

votes


















22














If using gitlab.com, the server is either being updated or having issues.



You can check https://status.gitlab.com for updates from the GitLab team.



There's also a Twitter account you can follow: https://twitter.com/gitlabstatus






share|improve this answer

























  • This depends on whether or not the official GitLab server is being used or GitLab is being run on an independent server, and which of the two is updating at the moment, but this was the case for me.

    – timelmer
    Feb 1 '17 at 0:27











  • I saw this issue right now, and yes gitlab.com shows that it's under maintenance, this truly could be the reason!

    – Eric Wang
    Feb 1 '17 at 5:00







  • 1





    And you can see gitlab.com status via twitter.com/gitlabstatus

    – Eric Wang
    Feb 1 '17 at 5:11


















6














You have to set the correct URL for the GitLab API in GitLab's configuration files.



As we can see in your gitlab-shell.log your API address is currently set to http://127.0.0.1:8080/. If you change the default URL where GitLab is running or if you changed its default port, you have to change it.



This parameter is configurable in /etc/gitlab/gitlab.rb :



## GitLab URL
##! URL on which GitLab will be reachable.
##! For more details on configuring external_url see:
##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
external_url 'http://127.0.0.1:3000'
[...]


This is the default value (as port 3000 is the default value in GitLab omnibus for unicorn). After you updated it you'll have to run a sudo gitlab-ctl reconfigure to apply this parameter.



It will override the file opt/gitlab/embedded/service/gitlab-shell/config.yml as mentioned in it's header comments.






share|improve this answer
































    4














    We've encountered this issue when hosting our gitlab on a "compute engine" from google cloud.
    The reason for this behaviour was not having a "swap" configured in our machine. Gitlab wasn't able to allocate additional memory.



    We decided to scale up our memory instead of creating a swap partition but it's your choice... :)






    share|improve this answer
































      2














      I had this once in gitlab.com and it was not the reliability, just that I was trying to push with --force to the master branch, and it was protected (see "protected branches" in the settings of the repository).






      share|improve this answer






























        1














        We've encountered this frequently of late. It's definitely GitLab running out of memory. We are not yet able to determine if GitLab is leaking memory or if our server instance is under-provisioned.






        share|improve this answer






























          1














          Restart the gitlab service fix my problem.



          sudo gitlab-ctl restart

          sudo gitlab-ctl reconfigure





          share|improve this answer






























            0














            I got the same problems in Bitnami. I have restarted all things and solved this problem by using



            /opt/bitnami/ctlscript.sh restart





            share|improve this answer

























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f31569555%2fhow-to-resolve-gitlab-api-is-not-accessible-when-pushing-to-a-new-repository%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              7 Answers
              7






              active

              oldest

              votes








              7 Answers
              7






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              22














              If using gitlab.com, the server is either being updated or having issues.



              You can check https://status.gitlab.com for updates from the GitLab team.



              There's also a Twitter account you can follow: https://twitter.com/gitlabstatus






              share|improve this answer

























              • This depends on whether or not the official GitLab server is being used or GitLab is being run on an independent server, and which of the two is updating at the moment, but this was the case for me.

                – timelmer
                Feb 1 '17 at 0:27











              • I saw this issue right now, and yes gitlab.com shows that it's under maintenance, this truly could be the reason!

                – Eric Wang
                Feb 1 '17 at 5:00







              • 1





                And you can see gitlab.com status via twitter.com/gitlabstatus

                – Eric Wang
                Feb 1 '17 at 5:11















              22














              If using gitlab.com, the server is either being updated or having issues.



              You can check https://status.gitlab.com for updates from the GitLab team.



              There's also a Twitter account you can follow: https://twitter.com/gitlabstatus






              share|improve this answer

























              • This depends on whether or not the official GitLab server is being used or GitLab is being run on an independent server, and which of the two is updating at the moment, but this was the case for me.

                – timelmer
                Feb 1 '17 at 0:27











              • I saw this issue right now, and yes gitlab.com shows that it's under maintenance, this truly could be the reason!

                – Eric Wang
                Feb 1 '17 at 5:00







              • 1





                And you can see gitlab.com status via twitter.com/gitlabstatus

                – Eric Wang
                Feb 1 '17 at 5:11













              22












              22








              22







              If using gitlab.com, the server is either being updated or having issues.



              You can check https://status.gitlab.com for updates from the GitLab team.



              There's also a Twitter account you can follow: https://twitter.com/gitlabstatus






              share|improve this answer















              If using gitlab.com, the server is either being updated or having issues.



              You can check https://status.gitlab.com for updates from the GitLab team.



              There's also a Twitter account you can follow: https://twitter.com/gitlabstatus







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Oct 24 '17 at 17:10









              aleclarson

              10.5k74167




              10.5k74167










              answered Dec 21 '16 at 5:49









              vendeeshwaran Chandranvendeeshwaran Chandran

              31137




              31137












              • This depends on whether or not the official GitLab server is being used or GitLab is being run on an independent server, and which of the two is updating at the moment, but this was the case for me.

                – timelmer
                Feb 1 '17 at 0:27











              • I saw this issue right now, and yes gitlab.com shows that it's under maintenance, this truly could be the reason!

                – Eric Wang
                Feb 1 '17 at 5:00







              • 1





                And you can see gitlab.com status via twitter.com/gitlabstatus

                – Eric Wang
                Feb 1 '17 at 5:11

















              • This depends on whether or not the official GitLab server is being used or GitLab is being run on an independent server, and which of the two is updating at the moment, but this was the case for me.

                – timelmer
                Feb 1 '17 at 0:27











              • I saw this issue right now, and yes gitlab.com shows that it's under maintenance, this truly could be the reason!

                – Eric Wang
                Feb 1 '17 at 5:00







              • 1





                And you can see gitlab.com status via twitter.com/gitlabstatus

                – Eric Wang
                Feb 1 '17 at 5:11
















              This depends on whether or not the official GitLab server is being used or GitLab is being run on an independent server, and which of the two is updating at the moment, but this was the case for me.

              – timelmer
              Feb 1 '17 at 0:27





              This depends on whether or not the official GitLab server is being used or GitLab is being run on an independent server, and which of the two is updating at the moment, but this was the case for me.

              – timelmer
              Feb 1 '17 at 0:27













              I saw this issue right now, and yes gitlab.com shows that it's under maintenance, this truly could be the reason!

              – Eric Wang
              Feb 1 '17 at 5:00






              I saw this issue right now, and yes gitlab.com shows that it's under maintenance, this truly could be the reason!

              – Eric Wang
              Feb 1 '17 at 5:00





              1




              1





              And you can see gitlab.com status via twitter.com/gitlabstatus

              – Eric Wang
              Feb 1 '17 at 5:11





              And you can see gitlab.com status via twitter.com/gitlabstatus

              – Eric Wang
              Feb 1 '17 at 5:11













              6














              You have to set the correct URL for the GitLab API in GitLab's configuration files.



              As we can see in your gitlab-shell.log your API address is currently set to http://127.0.0.1:8080/. If you change the default URL where GitLab is running or if you changed its default port, you have to change it.



              This parameter is configurable in /etc/gitlab/gitlab.rb :



              ## GitLab URL
              ##! URL on which GitLab will be reachable.
              ##! For more details on configuring external_url see:
              ##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
              external_url 'http://127.0.0.1:3000'
              [...]


              This is the default value (as port 3000 is the default value in GitLab omnibus for unicorn). After you updated it you'll have to run a sudo gitlab-ctl reconfigure to apply this parameter.



              It will override the file opt/gitlab/embedded/service/gitlab-shell/config.yml as mentioned in it's header comments.






              share|improve this answer





























                6














                You have to set the correct URL for the GitLab API in GitLab's configuration files.



                As we can see in your gitlab-shell.log your API address is currently set to http://127.0.0.1:8080/. If you change the default URL where GitLab is running or if you changed its default port, you have to change it.



                This parameter is configurable in /etc/gitlab/gitlab.rb :



                ## GitLab URL
                ##! URL on which GitLab will be reachable.
                ##! For more details on configuring external_url see:
                ##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
                external_url 'http://127.0.0.1:3000'
                [...]


                This is the default value (as port 3000 is the default value in GitLab omnibus for unicorn). After you updated it you'll have to run a sudo gitlab-ctl reconfigure to apply this parameter.



                It will override the file opt/gitlab/embedded/service/gitlab-shell/config.yml as mentioned in it's header comments.






                share|improve this answer



























                  6












                  6








                  6







                  You have to set the correct URL for the GitLab API in GitLab's configuration files.



                  As we can see in your gitlab-shell.log your API address is currently set to http://127.0.0.1:8080/. If you change the default URL where GitLab is running or if you changed its default port, you have to change it.



                  This parameter is configurable in /etc/gitlab/gitlab.rb :



                  ## GitLab URL
                  ##! URL on which GitLab will be reachable.
                  ##! For more details on configuring external_url see:
                  ##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
                  external_url 'http://127.0.0.1:3000'
                  [...]


                  This is the default value (as port 3000 is the default value in GitLab omnibus for unicorn). After you updated it you'll have to run a sudo gitlab-ctl reconfigure to apply this parameter.



                  It will override the file opt/gitlab/embedded/service/gitlab-shell/config.yml as mentioned in it's header comments.






                  share|improve this answer















                  You have to set the correct URL for the GitLab API in GitLab's configuration files.



                  As we can see in your gitlab-shell.log your API address is currently set to http://127.0.0.1:8080/. If you change the default URL where GitLab is running or if you changed its default port, you have to change it.



                  This parameter is configurable in /etc/gitlab/gitlab.rb :



                  ## GitLab URL
                  ##! URL on which GitLab will be reachable.
                  ##! For more details on configuring external_url see:
                  ##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
                  external_url 'http://127.0.0.1:3000'
                  [...]


                  This is the default value (as port 3000 is the default value in GitLab omnibus for unicorn). After you updated it you'll have to run a sudo gitlab-ctl reconfigure to apply this parameter.



                  It will override the file opt/gitlab/embedded/service/gitlab-shell/config.yml as mentioned in it's header comments.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Oct 25 '17 at 7:41









                  Benjamin Lg

                  134




                  134










                  answered Jul 23 '15 at 11:23









                  PierreFPierreF

                  1,71531934




                  1,71531934





















                      4














                      We've encountered this issue when hosting our gitlab on a "compute engine" from google cloud.
                      The reason for this behaviour was not having a "swap" configured in our machine. Gitlab wasn't able to allocate additional memory.



                      We decided to scale up our memory instead of creating a swap partition but it's your choice... :)






                      share|improve this answer





























                        4














                        We've encountered this issue when hosting our gitlab on a "compute engine" from google cloud.
                        The reason for this behaviour was not having a "swap" configured in our machine. Gitlab wasn't able to allocate additional memory.



                        We decided to scale up our memory instead of creating a swap partition but it's your choice... :)






                        share|improve this answer



























                          4












                          4








                          4







                          We've encountered this issue when hosting our gitlab on a "compute engine" from google cloud.
                          The reason for this behaviour was not having a "swap" configured in our machine. Gitlab wasn't able to allocate additional memory.



                          We decided to scale up our memory instead of creating a swap partition but it's your choice... :)






                          share|improve this answer















                          We've encountered this issue when hosting our gitlab on a "compute engine" from google cloud.
                          The reason for this behaviour was not having a "swap" configured in our machine. Gitlab wasn't able to allocate additional memory.



                          We decided to scale up our memory instead of creating a swap partition but it's your choice... :)







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Nov 24 '16 at 6:57

























                          answered Apr 19 '16 at 12:08









                          fatelfatel

                          1415




                          1415





















                              2














                              I had this once in gitlab.com and it was not the reliability, just that I was trying to push with --force to the master branch, and it was protected (see "protected branches" in the settings of the repository).






                              share|improve this answer



























                                2














                                I had this once in gitlab.com and it was not the reliability, just that I was trying to push with --force to the master branch, and it was protected (see "protected branches" in the settings of the repository).






                                share|improve this answer

























                                  2












                                  2








                                  2







                                  I had this once in gitlab.com and it was not the reliability, just that I was trying to push with --force to the master branch, and it was protected (see "protected branches" in the settings of the repository).






                                  share|improve this answer













                                  I had this once in gitlab.com and it was not the reliability, just that I was trying to push with --force to the master branch, and it was protected (see "protected branches" in the settings of the repository).







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Sep 8 '18 at 10:56









                                  knocteknocte

                                  9,34664988




                                  9,34664988





















                                      1














                                      We've encountered this frequently of late. It's definitely GitLab running out of memory. We are not yet able to determine if GitLab is leaking memory or if our server instance is under-provisioned.






                                      share|improve this answer



























                                        1














                                        We've encountered this frequently of late. It's definitely GitLab running out of memory. We are not yet able to determine if GitLab is leaking memory or if our server instance is under-provisioned.






                                        share|improve this answer

























                                          1












                                          1








                                          1







                                          We've encountered this frequently of late. It's definitely GitLab running out of memory. We are not yet able to determine if GitLab is leaking memory or if our server instance is under-provisioned.






                                          share|improve this answer













                                          We've encountered this frequently of late. It's definitely GitLab running out of memory. We are not yet able to determine if GitLab is leaking memory or if our server instance is under-provisioned.







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Aug 23 '16 at 2:15









                                          Lawrence DolLawrence Dol

                                          47.3k23125176




                                          47.3k23125176





















                                              1














                                              Restart the gitlab service fix my problem.



                                              sudo gitlab-ctl restart

                                              sudo gitlab-ctl reconfigure





                                              share|improve this answer



























                                                1














                                                Restart the gitlab service fix my problem.



                                                sudo gitlab-ctl restart

                                                sudo gitlab-ctl reconfigure





                                                share|improve this answer

























                                                  1












                                                  1








                                                  1







                                                  Restart the gitlab service fix my problem.



                                                  sudo gitlab-ctl restart

                                                  sudo gitlab-ctl reconfigure





                                                  share|improve this answer













                                                  Restart the gitlab service fix my problem.



                                                  sudo gitlab-ctl restart

                                                  sudo gitlab-ctl reconfigure






                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Jan 6 '17 at 10:34









                                                  Omega.yueOmega.yue

                                                  749




                                                  749





















                                                      0














                                                      I got the same problems in Bitnami. I have restarted all things and solved this problem by using



                                                      /opt/bitnami/ctlscript.sh restart





                                                      share|improve this answer





























                                                        0














                                                        I got the same problems in Bitnami. I have restarted all things and solved this problem by using



                                                        /opt/bitnami/ctlscript.sh restart





                                                        share|improve this answer



























                                                          0












                                                          0








                                                          0







                                                          I got the same problems in Bitnami. I have restarted all things and solved this problem by using



                                                          /opt/bitnami/ctlscript.sh restart





                                                          share|improve this answer















                                                          I got the same problems in Bitnami. I have restarted all things and solved this problem by using



                                                          /opt/bitnami/ctlscript.sh restart






                                                          share|improve this answer














                                                          share|improve this answer



                                                          share|improve this answer








                                                          edited Sep 7 '16 at 9:41









                                                          Ingo Karkat

                                                          135k14153205




                                                          135k14153205










                                                          answered Sep 7 '16 at 9:18









                                                          user3346513user3346513

                                                          1




                                                          1



























                                                              draft saved

                                                              draft discarded
















































                                                              Thanks for contributing an answer to Stack Overflow!


                                                              • Please be sure to answer the question. Provide details and share your research!

                                                              But avoid


                                                              • Asking for help, clarification, or responding to other answers.

                                                              • Making statements based on opinion; back them up with references or personal experience.

                                                              To learn more, see our tips on writing great answers.




                                                              draft saved


                                                              draft discarded














                                                              StackExchange.ready(
                                                              function ()
                                                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f31569555%2fhow-to-resolve-gitlab-api-is-not-accessible-when-pushing-to-a-new-repository%23new-answer', 'question_page');

                                                              );

                                                              Post as a guest















                                                              Required, but never shown





















































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown

































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown







                                                              Popular posts from this blog

                                                              Obelisk of Theodosius Contents History Description Notes Bibliography Further reading External links Navigation menuAge of spirituality : late antique and early Christian art, third to seventh centuryOver 60 picturesObelisks of the World41°00′21.24″N 28°58′31.43″E / 41.0059000°N 28.9753972°E / 41.0059000; 28.97539727724550-7235741376235741376

                                                              밀양 대씨 역사 각주 함께 보기 둘러보기 메뉴밀양 대씨

                                                              1973년 목차 사건 문화 탄생 사망 노벨상 달력 둘러보기 메뉴