??????push??????????
Asked by Kei Fukuda:

sourcetree?????????

???push???????????????????

.php?.css????????????push???????????????commit????????????1?????????push????push???????????????????????????????????????????

???????????????????

???????

git --no-optional-locks -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v origin refs/heads/master:refs/heads/master Pushing to ?URL? POST git-receive-pack (chunked) error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 send-pack: unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly Everything up-to-date Completed with errors, see above


Answers:
author: Ben
body: Hi Kei,

We have noticed increased reports of users encountering this issue when trying to push, and the issue appears to be with the version of GIT - most commonly version "**2.41.0** ".

Please update to the latest version of GIT using the link below and let me know if you still encounter issues:

* <https://git-scm.com/download/win>

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Kei Fukuda
body: ??????????????????

????????2.46.0??????????????????????????????

?????????????

????????????????????????


author: Ben
body: Hi Kei,

Would you be able to try perform a git push outside of sourcetree and let me know how this goes?

Cheers!

- Ben (Bitbucket Cloud Support)


author: Kei Fukuda
body: ?????????????

push??????????????????????

```
remote: Invalid credentials
fatal: Authentication failed for 'https://bitbucket.org/xxxxxx/'
```

????????????????????????????

<https://confluence.atlassian.com/bbkb/authentication-error-remote-invalid-username-or-password-942864127.html>

??????OAuth

??????HTTPS

????????????????????????


author: Ben
body: Hi Kei,

Just to clarify as I forgot to mention this before - the reason we are testing outside of sourcetree is to determine if this is a connection problem, or an application problem with sourcetree.

I'd recommend attempting to make use of an AppPassword for communicating to GIT via HTTPS.  
We have documentation for usage of app passwords at the following link:  
<https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/#Create-an-app-password>  
Essentially, when connecting via \*HTTPS\* you will use your AppPassword alongside your username seperated with a ":" character.

Therefore if you are authenticating to \*GIT over HTTPS\* to push/pull you will need to update your remote URL's to include the \*AppPassword\*:

```

git remote set-url origin https://USERNAME:APP_PASSWORD@bitbucket.org/workspaceID/reposlug.git
```

The same applies when performing git clone:

```
git clone https://USERNAME:APP_PASSWORD@bitbucket.org/workspaceID/reposlug.git
```

**NOTE:** You'll need to replace the above placeholder values USERNAME, APP_PASSWORD, workspaceID, reposlug with actual values.

I would suggest ensuring also that all stored passwords related to authentication over GIT are cleared from your machine (ie Credential Manager for Windows, Access Keychain for Mac or /etc/shadow folder for Linux).

If you are able to connect over HTTPS locally, Sourcetree may be the culprit.

Cheers!

- Ben (Bitbucket Cloud Support)


author: Kei Fukuda
body: ???????????

????????????????

url????????????????????????????????????

???????????????????????

Warning: embedding passwords in URLs is extremely insecure. You are advised to remove the password; Sourcetree will prompt you when a password is needed and you will have the option to use your Keychain to store them.

It is highly recommended to press 'Cancel' and remove the password(s) from your remote settings before proceeding. Click 'OK' if you want to embed the password anyway (not recommended).

???????????????????????????????????????????????????????????????????

?????????????

???????????????????????????????


author: Theodora Boudale
body: Hi [@Kei Fukuda](/t5/user/viewprofilepage/user-id/5574835),

Please allow me to step in as Ben is out of office.

You can try increasing the size of the buffer used to POST data with the command:

```
git config --global http.postBuffer 157286400
```

Then, attempt to push again. This will increase the size of the buffer to 150 MB.

<br />

With regards to the embedded password in the URL, it is indeed not secure to leave the app password in the URL. The suggestion was to do it temporarily because you were getting an authentication issue, in order to check if the 500 error occurs when pushing outside SourceTree.

<br />

If you execute the command I provided above and then try to push, is your push successful?

If you still see errors, is it the original HTTP 500 error or an authentication error?

Kind regards,  
Theodora


author: Kei Fukuda
body: ?????????????

```
git config --global http.postBuffer 157286400
```

?????????????????????????????????

????push???????????????????????????????????????

?????????????????????????


Tags: bitbucket-cloud

cloud