Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot push tag on shallow clone #2797

Closed
NahumLitvin opened this issue Aug 26, 2020 · 7 comments
Closed

cannot push tag on shallow clone #2797

NahumLitvin opened this issue Aug 26, 2020 · 7 comments

Comments

@NahumLitvin
Copy link

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.28.0.windows.1
cpu: x86_64
built from commit: 77982caf269b7ee713a76da2bcf260c34d3bf7a7
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver
WIndows Server 2016 Datacenter 
Microsoft Windows [Version 10.0.14393]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

type "C:\Program Files\Git\etc\install-options.txt"
Editor Option: VIM
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable Pseudo Console Support: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

** insert your response here **

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

cmd/Powershell/gitpython

git clone  git://gitserver.company.corp/repo.git --depth 1
git tag my_new_tag
git push --tags

  • What did you expect to occur after running these commands?

tag pushed to remote

  • What actually happened instead?
fatal: sha1 file '<stdout>' write error: Invalid argument
error: failed to push some refs to 'git://gitserver.company.corp/repo.git'

this works on my linux machines with no problem
tried on a few repos with git 2.6.3 and 2.28.0 with no avail.

@dscho
Copy link
Member

dscho commented Aug 26, 2020

Are you sure that those git:// repositories are push-enabled? I ask because git:// has no authentication nor encryption, and is therefore by default disallowing pushes.

@NahumLitvin
Copy link
Author

NahumLitvin commented Aug 26, 2020

@dscho yes, i'm 100% sure. those commands work on linux/mac flawlessly.
this is an internal machine that requires no authentication.

@dscho
Copy link
Member

dscho commented Aug 26, 2020

Maybe you need to set sendpack.sideband=false as described here?

@NahumLitvin
Copy link
Author

first of big thanks for your help.
I am aware of this issue and all our servers have this flag set by default
ran git config --global sendpack.sideband
just to be sure
on all the servers and it IS set to false.

@dscho
Copy link
Member

dscho commented Aug 26, 2020

@NahumLitvin this setting needs to be configured on the client-side AFAICT.

@NahumLitvin
Copy link
Author

@dscho that is so. it is set to false on all machines with git client.

@dscho
Copy link
Member

dscho commented Mar 28, 2022

Closing as stale.

@dscho dscho closed this as completed Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants