Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful error message when using unknown remote #701

Open
anonrig opened this issue Jun 3, 2023 · 6 comments
Open

Unhelpful error message when using unknown remote #701

anonrig opened this issue Jun 3, 2023 · 6 comments

Comments

@anonrig
Copy link
Member

anonrig commented Jun 3, 2023

I'm receiving a weird error running the following command:

git node land 48272
Error: git config,--get,remote.remote-upstream.url failed with stderr:
    at runSync (file:///Users/yagiz/.volta/tools/image/packages/node-core-utils/lib/node_modules/node-core-utils/lib/run.js:91:11)
    at new Session (file:///Users/yagiz/.volta/tools/image/packages/node-core-utils/lib/node_modules/node-core-utils/lib/session.js:30:26)
    at new LandingSession (file:///Users/yagiz/.volta/tools/image/packages/node-core-utils/lib/node_modules/node-core-utils/lib/landing_session.js:28:5)
    at main (file:///Users/yagiz/.volta/tools/image/packages/node-core-utils/lib/node_modules/node-core-utils/components/git/land.js:167:17)
@aduh95
Copy link
Contributor

aduh95 commented Jun 3, 2023

Can you paste the result of cat .git/config please?

@anonrig
Copy link
Member Author

anonrig commented Jun 3, 2023

cat .git/config
[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	ignorecase = true
	precomposeunicode = true
[remote "origin"]
	url = [email protected]:anonrig/node.git
	fetch = +refs/heads/*:refs/remotes/origin/*

@aduh95
Copy link
Contributor

aduh95 commented Jun 3, 2023

You don't have a remote called remote-upstream, so ncu cannot read the URL associated with it. To fix the issue, you need to either create a remote remote-upstream, or change the .ncu/config file to use a different remote name (likely upstream).

@anonrig
Copy link
Member Author

anonrig commented Jun 3, 2023

Ah, you're right. I've setup the NCU incorrectly. Thank you @aduh95

@anonrig anonrig closed this as completed Jun 3, 2023
@aduh95
Copy link
Contributor

aduh95 commented Jun 3, 2023

We could still decide to change the default to be upstream rather than remote-upstream and/or improve the error message when the git config call fails to hint into what might be wrong.

@anonrig
Copy link
Member Author

anonrig commented Jun 3, 2023

Definitely, that might be helpful, for cases like this.

@aduh95 aduh95 changed the title git node land xx fails Unhelpful error message when using unknown remote Jun 3, 2023
@aduh95 aduh95 reopened this Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants