Describe the bug
Not sure if this is actually a bug or an ID-ten-T error, but I'm having no luck figuring out what I'm doing wrong if the latter.
The issue is that when I try to push a tag, it hangs forever on the Pushing tag... dialog. My assumption is that it needs my github credentials to continue, but I don't see any means for entering them as in a standard git push from the Source Control sidebar.
What does the bug relate to
List the area(s) this issue relates to, for example:
To reproduce
Expected behaviour
The tag pushes like billy-o.
Environment
P.S. Git graph is super sweet
Thanks for reporting this issue. Git Graph doesn't detect askpass prompts for usernames or passwords, it assumes that the required credentials have already been saved (either when cloning the repo or from a previous git command that communicates with the remote). The behaviour you are observing appears to match this, as because there isn't a way to enter user credentials the git command doesn't finish executing.
To confirm this is the case for you, if you run git push origin <tag-name> in a terminal window. You should be prompted for your username and password if your credentials are not saved.
This behaviour should be the same for any other git actions that require remote communication (fetching from remotes, push branch or tag, delete remote branch or tag). They will work if the credentials are saved, but not if git prompts the user for credentials.
I'll add support for credential prompts in the next release. In the meantime, you could just save your git credentials so you can use this functionality in Git Graph.
Thanks for the response. My creds are definitely not saved, as pushing from the Source Control sidebar always prompts for creds, as does git from the terminal.
This will be available in v1.10.0.
If you'd like to use it before the next release, you can download v1.10.0-beta.1, and install it following the instructions provided here.
Please confirm that this beta release resolves this issue for you.
I've got 1.10.0-beta.0 installed, but now I can no longer add tags, which worked in the prior release. Error is:
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got '<linuxuser>@<machinename>.(none)')
...but my global config seems to be set up correctly:
~$ cat .gitconfig
[user]
email = <my email address>
name = <my name>
Can you try adding a tag from the terminal to confirm that it is only not working in Git Graph? Do any other Git Graph commands no longer work as well (but still work from their terminal git command)?
I鈥檝e tried adding a tag (and running other Git Graph commands) and haven鈥檛 had any problems with the beta release. (They shouldn鈥檛 be affected by any changes I made to fix this issue.)
Tagging from the terminal works:
$ git tag -a v0.1.0-fake
$
Pushing branches works and now prompts for creds as expected.
Is there anything else you'd like me to check?
Another issue I just discovered is that if I delete a remote branch at the source (e.g. at Github), I can't seem to delete the local tracking branch. Delete Remote Branch errors out with:
error: unable to delete 'foobar': remote ref does not exist
... and I can't seem to find a way to just delete the tracking branch without trying to delete the remote branch first.
Let me know if you'd like me to open a new issue for this or if I'm doing something wrong.
Also, thanks for the help and fixes so far, much appreciated.
git config user.name and git config user.email?git config --global user.email "[email protected]" and git config --global user.name "Your Name", setting them to your values, does it now work?--global, git config user.email "[email protected]" and git config user.name "Your Name", does it now work?user.name & user.email) to make the commit?If none of the above resolved the issue, can you please try the following steps:
As for Delete Remote Branch, this is the expected extension behaviour as you have deleted it on the remote, and the ref does not exist on the remote. You would need to run a command like git fetch --prune to remove your local copy of the remote ref which no longer exists. If you don't delete it from the source first (e.g. at GitHub), running Delete Remote Branch will delete it both on the remote and remove the local remote ref.
As for Delete Remote Branch, this is the correct behaviour
It is possible to remove a tracking branch without touching the remote:
$ git branch -d -r origin/foobar
Deleted remote-tracking branch origin/foobar (was 03db095).
Can you please try the following:
git config user.name and git config user.email still return the correct values from the global config)Pushing tags also prompts for creds as expected.
I've just made a new beta release with this fix in it. Please download v1.10.0-beta.1, and confirm that you can still add tags using the global git config.
Thanks for your assistance in troubleshooting this issue. It was caused because when I set new environment variables for the credentials, I overrode the default behaviour of cp.spawn which is to use process.env. This meant that environment variables defined in process.env were no longer available. Now I use the union of process.env and the new credential environment variables. I'm not sure why not having the environment variables didn't affect Windows, Mac or Remote WSL for me, and was an issue for you on Linux, but I'm glad it is now fixed.
I've raised #115 for deleting the local remote branch ref when running "Delete Remote Branch...", and the branch is already deleted on the remote.
Thanks for your assistance in troubleshooting this issue.
No sir, thank you. Git Graph makes my coding life better.
Tested creating, pushing, and deleting (including on the remote) a tag with beta.1, and everything works without needing local user/email settings configured.
Most helpful comment
No sir, thank you. Git Graph makes my coding life better.
Tested creating, pushing, and deleting (including on the remote) a tag with beta.1, and everything works without needing local user/email settings configured.