Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
06846397
Commit
06846397
authored
Dec 13, 2017
by
Achilleas Pipinellis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor Git troubleshooting docs
parent
b6c55e25
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
48 deletions
+47
-48
doc/topics/git/troubleshooting_git.md
doc/topics/git/troubleshooting_git.md
+47
-48
No files found.
doc/topics/git/troubleshooting_git.md
View file @
06846397
...
...
@@ -4,20 +4,22 @@ Sometimes things don't work the way they should or as you might expect when
you're using Git. Here are some tips on troubleshooting and resolving issues
with Git.
##
Error Messages
##
Broken pipe errors on git push
### ‘Broken pipe’ Errors on Git Push
‘Broken pipe’ errors can occur when attempting to push to a remote repository:
'Broken pipe' errors can occur when attempting to push to a remote repository.
When pushing you will usually see:
```
Write failed: Broken pipe
fatal: The remote end hung up unexpectedly
```
#### If pushing over HTTP
To fix this issue, here are some possible solutions.
### Increase the POST buffer size in Git
Try increasing the POST buffer size in Git configuration:
**If pushing over HTTP**
, you can try increasing the POST buffer size in Git's
configuration. Open a terminal and enter:
```
sh
git config http.postBuffer 52428800
...
...
@@ -26,58 +28,55 @@ git config http.postBuffer 52428800
The value is specified in bytes, so in the above case the buffer size has been
set to 50MB. The default is 1MB.
#### If pushing over SSH
1.
Check SSH configuration:
‘Broken pipe’ errors can sometimes be caused by underlying issues with SSH
(such as authentication), so first check that SSH is correctly configured by
following the instructions in [SSH Troubleshooting][SSH-Troubleshooting].
### Check your SSH configuration
1.
Prevent session timeouts by configuring SSH ‘keep alive’ either on the client
or on the server:
**If pushing over SSH**
, first check your SSH configuration as 'Broken pipe'
errors can sometimes be caused by underlying issues with SSH (such as
authentication). Make sure that SSH is correctly configured by following the
instructions in the [SSH troubleshooting] docs.
>**Note:** configuring *both* the client and the server is unnecessary.
There's another option where you can prevent session timeouts by configuring
SSH 'keep alive' either on the client or on the server (if you are a GitLab
admin and have access to the server).
#### Configure SSH on the client
NOTE:
**Note:**
configuring
*both*
the client and the server is unnecessary.
**On Linux (ssh)**
**To configure SSH on the client side**
:
Edit `~/.ssh/config` (create the file if it doesn’t exist) and insert:
-
On UNIX, edit
`~/.ssh/config`
(create the file if it doesn’t exist) and
add or edit:
```apache
```
Host your-gitlab-instance-url.com
ServerAliveInterval 60
ServerAliveCountMax 5
```
**On Windows (PuTTY)**
In your session properties, go to *Connection* and under
`Sending of null packets to keep session active`, set
`Seconds between keepalives (0 to turn off)` to 60.
#### Configure SSH on the server
-
On Windows, if you are using PuTTY, go to your session properties, then
navigate to "Connection" and under "Sending of null packets to keep
session active", set "Seconds between keepalives (0 to turn off)" to
`60`
.
Edit `/etc/ssh/sshd_config` and insert
:
**To configure SSH on the server side**
, edit
`/etc/ssh/sshd_config`
and add
:
```apache
ClientAliveInterval 60
ClientAliveCountMax 5
```
```
ClientAliveInterval 60
ClientAliveCountMax 5
```
###
# If 'pack-objects' type errors are also being displayed
###
Running a git repack
1.
Try to run a
`git repack`
before attempting to push to the remote repository again:
**If 'pack-objects' type errors are also being displayed**
, you can try to
run a
`git repack`
before attempting to push to the remote repository again:
```
git repack
git push
```
```
sh
git repack
git push
```
1.
If you’re running an older version of Git (
<
2
.
9
),
consider
upgrading
Git
to
>
= 2.9
(see ‘
[
Broken pipe when pushing to Git repository
][
Broken-Pipe
]
').
### Upgrade your Git client
[
SSH-Troubleshooting
]:
https://docs.gitlab.com/ce/ssh/README.html#troubleshooting
"SSH Troubleshooting"
In case you're running an older version of Git (< 2.9), consider upgrading
to >= 2.9 (see
[
Broken pipe when pushing to Git repository
][
Broken-Pipe
]
).
[
SSH troubleshooting
]:
../../ssh/README.md#troubleshooting
"SSH Troubleshooting"
[
Broken-Pipe
]:
https://stackoverflow.com/questions/19120120/broken-pipe-when-pushing-to-git-repository/36971469#36971469
"StackOverflow: 'Broken pipe when pushing to Git repository'"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment