This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 268196 - netbeans keeps asking me for credentials on all my git repositories
Summary: netbeans keeps asking me for credentials on all my git repositories
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 8.2
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-25 22:19 UTC by Milos Kleint
Modified: 2016-09-27 06:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (82.39 KB, image/png)
2016-09-25 22:19 UTC, Milos Kleint
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Kleint 2016-09-25 22:19:04 UTC
Created attachment 162208 [details]
screenshot

netbeans keeps asking me for credentials on all my git repositories while sourcetree just works and is able to figure out stuff from my user home content I suppose. 

I don't want to configure every single repository within netbeans. Things should just work as well.

see attached picture for the git repository url format
Comment 1 Ondrej Vrabec 2016-09-26 06:48:38 UTC
(In reply to Milos Kleint from comment #0)
> netbeans keeps asking me for credentials on all my git repositories
Just out of nothing? Or does it ask on an explicit user action (git fetch/push etc.)?
> I don't want to configure every single repository within netbeans. Things
> should just work as well.
What's exactly the issue here? Do you expect the Git support guesses your credentials for the repository and connect automatically from a system-wide setup?
Comment 2 Milos Kleint 2016-09-26 07:01:28 UTC
(In reply to Ondrej Vrabec from comment #1)
> (In reply to Milos Kleint from comment #0)
> > netbeans keeps asking me for credentials on all my git repositories
> Just out of nothing? Or does it ask on an explicit user action (git
> fetch/push etc.)?


on pull/fecth

> > I don't want to configure every single repository within netbeans. Things
> > should just work as well.
> What's exactly the issue here? Do you expect the Git support guesses your
> credentials for the repository and connect automatically from a system-wide
> setup?

yes. I expect it to pick up my system wide settings (git pull on cmd line works).

I'm on macosx btw if that makes ay difference.
Comment 3 Ondrej Vrabec 2016-09-26 07:57:00 UTC
> yes. I expect it to pick up my system wide settings (git pull on cmd line works).
Then how does CLI git know your credentials? Do you set the password in the URL in .git/config? Or do you use ssh keys to access the repo (if so, then how do you tell Git what .ssh/id_* belongs to the URL and where to get the passphrase unlocking the key file)? I am just asking to see how to tune the authentication on our side and how to make it work with your environment - I very much doubt I can make it work for all cases, so better to start with yours.
Comment 4 Milos Kleint 2016-09-26 22:28:16 UTC
My .ssh has just one key.

drwx------    6 mkleint  staff   204 24 Sep 17:49 .
drwxr-xr-x  188 mkleint  staff  6392 23 Sep 08:59 ..
-rwxr--r--    1 mkleint  staff  2451  6 Nov  2015 config
-r--------    1 mkleint  staff  1766 30 Jun  2014 id_rsa
-rw-r--r--    1 mkleint  staff   397 30 Jun  2014 id_rsa.pub
-rw-r--r--    1 mkleint  staff  3072 26 Sep 10:54 known_hosts


my gitconfig looks like this:

[user]
        name = Milos Kleint
        email = mkleint@atlassian.com
[core]
        excludesfile = /Users/mkleint/.gitignore_global
[difftool "sourcetree"]
        cmd = opendiff \"$LOCAL\" \"$REMOTE\"
        path = 
[mergetool "sourcetree"]
        cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
        trustExitCode = true


.git/config in example repository (where cmd like git pull works OOTB

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
        precomposeunicode = false
[remote "origin"]
        url = ssh://git@stash.atlassian.com:7997/buildeng/bamboo-admin-warning-plugin.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master
Comment 5 Ondrej Vrabec 2016-09-27 06:27:19 UTC
There should be something related in .ssh/config as well, can you please share its content?