bitbucket git push stuck
Asked Answered
R

3

8

Hi just set up a new bitbucket account and created a repo. I already have code in my local machine so I added the remote using git remote add now when i did git push origin, it prompted me to put password for the bitbucket account. After i entered the password, it just appears to be stuck. i ran git push on verbose mode but after I put the password it seems to be stuck.

Also I added my ssh key to bitbucket thinking that might help resolve the issue if it was authentication issue, but it still asks me for the password and get stuck after i provide it.

Roberge answered 24/10, 2012 at 5:14 Comment(0)
B
2

Also I added my ssh key to bitbucket thinking that might help resolve the issue if it was authentication issue, but it still asks me for the password

It only adds a password if:

  • it cannot find your public/private keys (~/.ssh/id_rsa(.pub)): check, if you are on Windows, if %HOME% is defined)
  • the public key has been incorrectly copied over to bitbucket (typically with a newline in it)
  • your remote (git remote -v show) is still configured with https address.

ssh key

Check out the BitBucket Set up SSH for Git page, and try cloning your repo using the ssh address.
(Note: for step 5 on that Help page, see also "My .bashrc file not executed on Git Bash startup (Windows 7)").

Bimestrial answered 24/10, 2012 at 5:53 Comment(3)
Thanks VonC, Here is what I am seeing, from cygwin i am not able to push as it prompts me for password and gets stuck after that. I tried "GIT Bash" tool, and it still prompted me for password but i was able to do a push. It is strange as it works fine for github. In Cygwin: $ git pull \n Password for '[email protected]': password In Git Bash: $ git pull \n Password for 'bitbucket.org':Roberge
@Roberge cygwin? Could you rather use msysgit? (see #784406)Bimestrial
btw, i also tried doing it via git plugin in eclipse, i get the following message: [email protected]/USERNAME/repo.git: 301 Moved PermanentlyRoberge
B
24

For me the problem is IPv4 needs to be used for bitbucket - using IPv6 hangs at trying to establish a connection to port 22 on the ipv6 address..

To fix this - edit your /etc/ssh/ssh_config file and change

#AddressFamily any

to

AddressFamily inet

This forces ssh (and so git) to use ipv4 and not ipv6 sometimes

Budde answered 18/1, 2020 at 8:16 Comment(4)
On ubuntu, mine ssh_config path was /etc/ssh/ssh_configAnaesthetize
Worked! I have no idea why this is happening now. It worked a couple of weeks ago.Philosophism
Worked for me too! Not sure why this came up out of nowhere after years of everything working fine. My windows config file was in ~/.ssh/configEocene
Worked for me in Ubuntu 22.04.Equally
B
2

Also I added my ssh key to bitbucket thinking that might help resolve the issue if it was authentication issue, but it still asks me for the password

It only adds a password if:

  • it cannot find your public/private keys (~/.ssh/id_rsa(.pub)): check, if you are on Windows, if %HOME% is defined)
  • the public key has been incorrectly copied over to bitbucket (typically with a newline in it)
  • your remote (git remote -v show) is still configured with https address.

ssh key

Check out the BitBucket Set up SSH for Git page, and try cloning your repo using the ssh address.
(Note: for step 5 on that Help page, see also "My .bashrc file not executed on Git Bash startup (Windows 7)").

Bimestrial answered 24/10, 2012 at 5:53 Comment(3)
Thanks VonC, Here is what I am seeing, from cygwin i am not able to push as it prompts me for password and gets stuck after that. I tried "GIT Bash" tool, and it still prompted me for password but i was able to do a push. It is strange as it works fine for github. In Cygwin: $ git pull \n Password for '[email protected]': password In Git Bash: $ git pull \n Password for 'bitbucket.org':Roberge
@Roberge cygwin? Could you rather use msysgit? (see #784406)Bimestrial
btw, i also tried doing it via git plugin in eclipse, i get the following message: [email protected]/USERNAME/repo.git: 301 Moved PermanentlyRoberge
P
2

I was trying to push a file over 10MB and the push got stuck. Fixed it by increasing the HTTP post buffer size

git config --global http.postBuffer 524288000
Peraea answered 21/8, 2023 at 20:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.