bundles/org.eclipse.orion.client.git/web/orion/git/gitPreferenceStorage.js
function(repository){
			var credentials = {
				gitSshUsername : "",
				gitSshPassword : "",
				gitPrivateKey : "",
				gitPassphrase : ""
			};
			
			var d = new Deferred();
			this._preferenceService.get(this._prefix, undefined, {scope: 2}).then(
				function(pref){
					var settings = pref["settings"];
					if(settings === undefined){
						d.reject();
						return;
					}
				
					if(settings.enabled){
						var userCredentials = pref[repository];
						if(userCredentials !== undefined) { d.resolve(userCredentials); }
						else { d.resolve(credentials); }
					} else { d.reject(); }
				}
			);
			
			return d;
		}
function(repository){
			var credentials = {
				gitSshUsername : "",
				gitSshPassword : "",
				gitPrivateKey : "",
				gitPassphrase : ""
			};
			
			var d = new Deferred();
			this._preferenceService.get(this._prefix, undefined, {scope: 2}).then(
				function(pref){
					var settings = pref["settings"];
					if(settings === undefined){
						d.reject();
						return;
					}
				
					if(settings.enabled){
						var userCredentials = pref[repository];
						if(userCredentials !== undefined) { d.resolve(userCredentials); }
						else { d.resolve(credentials); }
					} else { d.reject(); }
				}
			);
			
			return d;
		}
function ( repository ) { var credentials = { gitSshUsername : "" , gitSshPassword : "" , gitPrivateKey : "" , gitPassphrase : "" } ; var d = new Deferred ( ) ; this . _preferenceService . get ( this . _prefix , undefined , { scope : 2 } ) . then ( function ( pref ) { var settings = pref [ "settings" ] ; if ( settings === undefined ) { d . reject ( ) ; return ; } if ( settings . enabled ) { var userCredentials = pref [ repository ] ; if ( userCredentials !== undefined ) { d . resolve ( userCredentials ) ; } else { d . resolve ( credentials ) ; } } else { d . reject ( ) ; } } ) ; return d ; }
Retrieves git credentials for the given repository.
Some credentials fields may be in form of empty strings if not present in the storage.

@param repository [required] unique repository URL
Retrieves git credentials for the given repository . Some credentials fields may be in form of empty strings if not present in the storage .