Questions tagged [ls-remote]
18 questions
138
votes
8 answers
How can I check write access to a remote Git repository ("can I push?")
I am building a (somewhat limited) Git client. To set up a repository, you enter the URL to the remote repo. I want to check whether the user has read+write access to that repository. If not, I present an authentication dialog.
I check 'read' access…

Yang Meyer
- 5,409
- 5
- 39
- 51
7
votes
2 answers
Get only remote branches that have already been merged into master/develop
git ls-remote --h .git 'refs/heads/*'
which lists all the branches created on remote repository.
But I would like to extend this command to use --merged option, since I would like to get lists of branches which are already…

Neha
- 73
- 1
- 4
7
votes
1 answer
Git https:// repository not found though it exists
I have a private repo on github. It's location was changed.
I tried changing the remote but I wasn't able to push anymore.
ls-remote https://github.com/xxxxx/xxxxx.git
gave me this
remote: Repository not found.
fatal: repository…

user1783346
- 135
- 1
- 2
- 8
5
votes
1 answer
How to use git merge-base on remote?
How can use merge-base with Git on a remote repository without checking it out? Using ls-remote works fine e.g. for determining branches like this:
git ls-remote --heads $REPO_URL/$REPO_NAME
The documentation contains no clue, wether the use of…

alex
- 5,516
- 2
- 36
- 60
4
votes
1 answer
git (ls-remote) - List "remote" branches ordered by creation date
I know that with the git command below I can list all my "remote" branches...
[someone@someone-pc somerepo]$ git ls-remote
Username for 'https://somegit.com': someone
Password for 'https://someone@somegit.com':
From…

Eduardo Lucio
- 1,771
- 2
- 25
- 43
3
votes
0 answers
ls-remote causes a timeout and returns error code -1 when polling a git server through jenkins
I am trying to configure a Jenkins Server (ver 1.656) to trigger build on commit notification, but every polling scheduled or triggered after the notification received by Jenkins keeps timing out :
Started on 12.07.2016 13:49:39
Using strategy:…

Dijdkay
- 56
- 1
- 5
3
votes
4 answers
git ls-remote returns "fatal: No remote configured to list refs from."
$ git ls-remote
results in
fatal: No remote configured to list refs from.
I have remotes defined
$ git remote
results in
personal_remote
upstream

eebbesen
- 5,070
- 8
- 48
- 70
2
votes
1 answer
Is "git ls-remote" a read-only operation?
We are planning to use git ls-remote […] without any additional parameters concurrently to virtually any other Git operation. I'm looking for a confirmation that ls-remote is read-only, so it can't break any other operation.

mstrap
- 16,808
- 10
- 56
- 86
1
vote
0 answers
"failed to load compute presentation" error while using git.NewRemote for listing tag in golang
i am trying to fetch all the tags of a gitlab repo without cloning the code via go-git package. As per go documentation (https://github.com/go-git/go-git/blob/v5.4.2/_examples/ls-remote/main.go)
i am using git.newRemote to create a new remote for…

santosh nahak
- 55
- 5
1
vote
2 answers
How to git ls-remote tags in a specific branch
Before cloning a repository, I want to list all the tags in the master branch to filter and finally retrieve a subset of required commits without transferring any additional data.
Is it possible to use git ls-remote to list all tags in a particular…

aboger
- 2,214
- 6
- 33
- 47
1
vote
0 answers
getting information about commits of remote branches [Git]
Question about Git:
For a remote project, I would like to get it's last commit information (the last commit date) of a specific branch, without doing a clone.
I saw that I can use the following command git ls-remote --heads ssh: in order to…

TTaJTa4
- 810
- 1
- 8
- 22
0
votes
1 answer
git ls-remote http issue
kestrel http server (win7 sp1 x64) running on port 3112 and serve static git repository files
these commands are executed using git bash on win10 and win7 client machines with same results
curl http://server:3112/repository/.git/HEAD
// ok
git…

geek175
- 127
- 1
- 7
0
votes
1 answer
How to manually do `git ls-remote` with a http client
I want to query the latest remote HEAD commit for 10000+ https git repositories, every hour. Basically this x10000:
remote=https://github.com/torvalds/linux
git ls-remote $remote HEAD | awk '{print $1}'
Most, but not all, remotes are on a single…

Jeroen Ooms
- 31,998
- 35
- 134
- 207
0
votes
1 answer
Git command - Repository heads not listed while using -h switch with "HEAD" option
There is a git repository in my LAN. I try to query Git to list all the HEAD references in the following way:
Method 1
Command
git ls-remote -h username@{ip-address}:/path/to/repo
Output
f0467f266dee55cd32f2ca6fa819814f367db899 HEAD
Method…

Bala Krishnan
- 374
- 3
- 18
0
votes
1 answer
Is it possible to check, if a git tag is reachable from another git tag in same repo using remote commands?
Is it possible to check if, a git tag/commit is reachable from another git tag/commit in a repo through remote git commands i.e without cloning the code.
I can do it locally using git rev-list or git merge-base.
I tried using git ls-remote, but…

akshat
- 1,219
- 1
- 8
- 24