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.

Missing `.git` in https URL

See original GitHub issue

I am working on using this action in our workflow however we have a test that sort of depends on having the .git portion in the remote url via git config --get remote.origin.url. I noticed in the URL helper it is just doing a basic https remote add but not using the .git portion. Is this intended or if I open a PR to include this would it break any downstream items. Thank you for your time and for this very helpful action 😄

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
rxmarblescommented, Dec 31, 2020

@dragonDScript no that is not the case in this case I’m simply refering to the remote origin url missing the .git if you look at this line https://github.com/actions/checkout/blob/c952173edf/src/url-helper.ts#L15 it is added as part of the ssh-key method. Which is why I’m wondering if it was intentional that it isn’t added as part of a regular checkout

0reactions
robbmcleodcommented, Jan 7, 2022

You can force Checkout to get the .git folder by setting the keyword fetch-depth to some value. A fetch-depth of zero forces it to get the entire history. The default value of '' gets no history, and hence no folder.

Example:

  - name: Checkout repo
    uses: actions/checkout@v2
    with:
      repository: my-project/my-repo
      path: my-repo
      fetch-depth: 0
Read more comments on GitHub >

github_iconTop Results From Across the Web

Given HTTPs URL of git repository, is it possible to retrieve the ...
For GitHub specifically, yes, it is. A repository that has the HTTPS URL of https://github.com/foo/bar.git will also be accessible at git@github ...
Read more >
(HTTP/S) Git clone command does not work with url which has ...
(HTTP/S) Git clone command does not work with url which has missing .git extension. Here are the steps to recreate: Add a git...
Read more >
git-config Documentation - Git
<URL>.key whose <URL> part matches the best to the given URL is returned (if no such key exists, the value for section.key is...
Read more >
git-svn Documentation - Git
For transports that SVN handles authentication for (http, https, ... Passing --no-minimize-url will allow git svn to accept URLs as-is without attempting to ......
Read more >
git-submodule Documentation - Git
With no arguments, shows the status of existing submodules. ... <repository> is the URL of the new submodule's origin repository.
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