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

Unable to add a Git Repository with file:// URL #9192

Open
agrare opened this issue May 17, 2024 · 4 comments
Open

Unable to add a Git Repository with file:// URL #9192

agrare opened this issue May 17, 2024 · 4 comments
Assignees

Comments

@agrare
Copy link
Member

agrare commented May 17, 2024

The error message on the URL field indicates that file:// is a valid protocol but when I try to pass a file:///path/to/repo it fails.

image

But creating it via rails c works and sync successfully
ManageIQ::Providers::Workflows::AutomationManager::ConfigurationScriptSource.create!(:name => "adam-workflows", :scm_url => "file:///home/grare/adam/src/manageiq/adam-workflows")

Looks like we have a custom url validator: https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/javascript/components/workflow-repository-form/helpers.jsx

    {
      component: componentTypes.TEXT_FIELD,
      label: __('URL'),
      maxLength: 128,
      id: 'scm_url',
      name: 'scm_url',
      isRequired: true,
      validate: [
        (value) => (customUrlValidator(value)
          ? undefined
          // eslint-disable-next-line max-len
          : 'URL must include a protocol (http://, https:// or file://) with path or be a valid SSH path (user@server:path or ssh://user@address:port/path)'),
      ],
    },
@agrare agrare added the bug label May 17, 2024
@agrare
Copy link
Member Author

agrare commented May 17, 2024

cc @Fryguy @jeffibm

@Fryguy
Copy link
Member

Fryguy commented May 17, 2024

I kinda want file for development, but not for production (I can't think of a production use case). @jeffibm Is that possible?

@Fryguy
Copy link
Member

Fryguy commented May 22, 2024

This happens on any form that has repository create/edit (workflows, ansible, etc).

@miq-bot
Copy link
Member

miq-bot commented Aug 26, 2024

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants