extensions/git/src/git.ts/Repository/getRemotes
class Repository:	async getRemotes(): Promise<Remote[]> {
		try {
			// Attempt to parse the config file
			const remotes = await this.getRemotesFS();
			if (remotes.length === 0) {
				throw new Error('No remotes found in the git config file.');
			}

			return remotes;
		}
		catch (err) {
			this.logger.warn(err.message);
		}

		// Fallback to using git to determine remotes
		const result = await this.exec(['remote', '--verbose']);
		const lines = result.stdout.trim().split('\n').filter(l => !!l);
		const remotes: MutableRemote[] = [];

		for (const line of lines) {
			const parts = line.split(/\s/);
			const [name, url, type] = parts;

			let remote = remotes.find(r => r.name === name);

			if (!remote) {
				remote = { name, isReadOnly: false };
				remotes.push(remote);
			}

			if (/fetch/i.test(type)) {
				remote.fetchUrl = url;
			} else if (/push/i.test(type)) {
				remote.pushUrl = url;
			} else {
				remote.fetchUrl = url;
				remote.pushUrl = url;
			}

			// https://github.com/microsoft/vscode/issues/45271
			remote.isReadOnly = remote.pushUrl === undefined || remote.pushUrl === 'no_push';
		}

		return remotes;
	}