question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Open/add local repo from command line should not prompt for approval

See original GitHub issue

Description

If I’m adding a repo from the command line, the path is most likely correct and I have already made my decision to add it. I do not want to have to confirm a dialog box.

This would also help with automation

Version

  • GitHub Desktop: 1.1.0
  • Operating system: macOS 10.13.3

Steps to Reproduce

github open “/users/matt/projects/test”

Expected Behavior

Should just add it if it’s a valid local repo

Actual Behavior

I have to confirm a dialog accepting the values I know are correct because i passed them to the app

screen shot 2018-03-15 at 23 18 43

Alternatively, an add command could be added to the github command line app.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
shiftkeycommented, Mar 29, 2018

I meant that another app/website could make a similar URL, and if we bypassed user approval when the URL is called, arbitrary code could be downloaded onto the user’s computer.

This is what currently happens in Desktop when you provide a URL rather than a path:

I don’t think the proposed change here to add the valid repository that exists on disk changes this behaviour (which isn’t ideal).

2reactions
shiftkeycommented, Mar 16, 2018

As part of this workflow we already check if this path is associated with a tracked repository, and select that to avoid confusion:

https://github.com/desktop/desktop/blob/1b96ce51c752cc077b53a4ad01052f16ce1905b2/app/src/lib/dispatcher/dispatcher.ts#L841-L848

I think I’d be 👍 to adding the repository if:

  • it comes from the open-repository-from-path code path (i.e. the user initiated this from the CLI)
  • is a valid Git repository

Otherwise we should end up on this path, with details about why we need user input.

cc @desktop/core @desktop/comrades for feels

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git on the command line - GitLab Docs
To execute Git commands on your computer, you must open a terminal (also known as command prompt, command shell, and command line). Here...
Read more >
Adding locally hosted code to GitHub
If you have existing source code or repositories stored locally on your computer or private network you can add them to GitHub by...
Read more >
Clone a Git repository | Bitbucket Cloud - Atlassian Support
Learn how to clone a Git repository using the command line, Sourcetree, or other Git clients.
Read more >
Is it possible to create a remote repo on GitHub from the CLI ...
You can create a GitHub repo via the command line using the GitHub API. ... however I am not able to use the...
Read more >
How to Get Started with GIT and work with GIT Remote Repo
To issue a command, start a "Terminal" (for Ubuntu/Mac) or "Git Bash" ... We do not wish to track the " .class "...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found