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

Cannot restore Git dependency on Azure web sites #1863

Closed
tpetricek opened this issue Aug 21, 2016 · 19 comments
Closed

Cannot restore Git dependency on Azure web sites #1863

tpetricek opened this issue Aug 21, 2016 · 19 comments

Comments

@tpetricek
Copy link
Member

Description

I tried using Paket to install Git dependencies in Azure web sites - running Paket on Azure machine - and it fails to restore Git dependency:

Paket.exe 3.13.3.0 is up to date.
Paket version 3.13.3.0
Paket failed with:
    Checkout to D:\home\site\repository\paket-files\github.com\ionide\FsAutoComplete failed.
Message: Could not run "git clone file:///.paket\git\db\FsAutoComplete".
Error: 
Cloning into 'FsAutoComplete'...
fatal: 'D:/Program Files (x86)/Git/.paket/git/db/FsAutoComplete' does not 
appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Paket failed with:\r\n  
  Checkout to D:\home\site\repository\paket-files\github.com\ionide\FsAutoComplete failed.\r\n
  Message: Could not run "git clone file:///.paket\git\db\FsAutoComplete".\r\n
  Error: \r\nCloning into 'FsAutoComplete'...\r\n
    fatal: 'D:/Program Files (x86)/Git/.paket/git/db/FsAutoComplete' does not appear 
       to be a git repository\r\n
    fatal: Could not read from remote repository.\r\n\r\n
      Please make sure you have the correct access rights\r\n
      and the repository exists.\r\nD:\Program Files (x86)\
         SiteExtensions\Kudu\57.50815.2378\bin\Scripts\starter.cmd build.cmd deploy

Repro steps

All I had in my paket.dependencies was

framework: >= net40
source https://nuget.org/api/v2

nuget FAKE

git https://github.com/ionide/FsAutoComplete.git cors build:"build.cmd LocalRelease", OS: windows
git https://github.com/ionide/FsAutoComplete.git cors build:"build.sh LocalRelease", OS: mono

Related information

Version of Git on the Azure box is:

git version 2.8.1.windows.1
@forki
Copy link
Member

forki commented Aug 21, 2016

I don't have azure, so I'm not able to debug this. Any ideas what's going
wrong?

Am 21.08.2016 03:45 schrieb "Tomas Petricek" [email protected]:

Description

I tried using Paket to install Git dependencies in Azure web sites -
running Paket on Azure machine - and it fails to restore Git dependency:

Paket.exe 3.13.3.0 is up to date.
Paket version 3.13.3.0
Paket failed with:
Checkout to D:\home\site\repository\paket-files\github.com\ionide\FsAutoComplete failed.
Message: Could not run "git clone file:///.paket\git\db\FsAutoComplete".
Error:
Cloning into 'FsAutoComplete'...
fatal: 'D:/Program Files (x86)/Git/.paket/git/db/FsAutoComplete' does not
appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Paket failed with:\r\n
Checkout to D:\home\site\repository\paket-files\github.com\ionide\FsAutoComplete failed.\r\n
Message: Could not run "git clone file:///.paket\git\db\FsAutoComplete".\r\n
Error: \r\nCloning into 'FsAutoComplete'...\r\n
fatal: 'D:/Program Files (x86)/Git/.paket/git/db/FsAutoComplete' does not appear
to be a git repository\r\n
fatal: Could not read from remote repository.\r\n\r\n
Please make sure you have the correct access rights\r\n
and the repository exists.\r\nD:\Program Files (x86)
SiteExtensions\Kudu\57.50815.2378\bin\Scripts\starter.cmd build.cmd deploy

Repro steps

All I had in my paket.dependencies was

framework: >= net40
source https://nuget.org/api/v2

nuget FAKE

git https://github.com/ionide/FsAutoComplete.git cors build:"build.cmd LocalRelease", OS: windows
git https://github.com/ionide/FsAutoComplete.git cors build:"build.sh LocalRelease", OS: mono

Related information

Version of Git on the Azure box is:

git version 2.8.1.windows.1


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1863, or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNJH7x-IXzU9DllxFdAT8kMUNGM_eks5qh63GgaJpZM4JpNFC
.

@cdrnet
Copy link
Member

cdrnet commented Aug 21, 2016

To my understanding you do not have write permissions to D:/Program Files (x86) in Azure web sites.

@forki
Copy link
Member

forki commented Aug 21, 2016

Weird. Why would we write there?

@isaacabraham
Copy link
Contributor

@cdrnet Yeah, I would imagine that that's the problem, although the error message could be a little clearer.

@forki
Copy link
Member

forki commented Aug 21, 2016

So if someone can find the place where we try to write there it would be really helpful

@tpetricek
Copy link
Member Author

Is there a way to get more verbose log than with -v?

The script runs in D:\home\site\repository and the output message says that it tries to check out into D:\home\site\repository\paket-files\github.com\ionide\FsAutoComplete, but then it says Could not run "git clone file:///.paket\git\db\FsAutoComplete", which makes me think that perhaps (for some reason), the command that Paket runs is somehow incorrectly generated?

@forki
Copy link
Member

forki commented Aug 21, 2016

-v is all we have. More details can only be added in pull request.

Am 21.08.2016 19:00 schrieb "Tomas Petricek" [email protected]:

Is there a way to get more verbose log than with -v?

The script runs in D:\home\site\repository and the output message says
that it tries to check out into D:\home\site\repository\paket-files
github.com\ionide\FsAutoComplete, but then it says Could not run "git
clone file:///.paket\git\db\FsAutoComplete", which makes me think that
perhaps (for some reason), the command that Paket runs is somehow
incorrectly generated?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1863 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNA-PV99ouJl6RICcz5qnvdbZQ0C8ks5qiIQbgaJpZM4JpNFC
.

@forki
Copy link
Member

forki commented Aug 22, 2016

@tpetricek any chane for me to reproduce that with your project? like pushing more and more paket releases with more detailed logs and see what happens?

@forki
Copy link
Member

forki commented Aug 22, 2016

when I run locally I get:

image

so it's using my user path where it's using D:/Program Files (x86)/Git/ for you

@forki
Copy link
Member

forki commented Aug 22, 2016

@tpetricek what's Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) giving you?

@tpetricek
Copy link
Member Author

@forki Good psychic debugging skills!

System.Environment.GetFolderPath(System.Environment.SpecialFolder.UserProfile);;
val it : string = ""

@forki
Copy link
Member

forki commented Aug 22, 2016

ok. then I need to work around that.

@forki
Copy link
Member

forki commented Aug 22, 2016

any ideas for alternative location for git repo cache?

@tpetricek
Copy link
Member Author

I suppose LocalApplicationData might work:

System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData);;
val it : string = "C:\DWASFiles\Sites#1tryfsharp-autocomplete\LocalAppData"

(Unless the hash sign in the URL breaks something else :-))

Alternatively:

  • Allow an override via an explicitly specified environment variable? (Probably too much hassle)
  • Local directory of paket.exe (Not that useful, but would likely always work)

@forki
Copy link
Member

forki commented Aug 22, 2016

ok let's test LocalApplicationData - but tomorrow...

@tpetricek
Copy link
Member Author

👍

@forki
Copy link
Member

forki commented Aug 22, 2016

ok release new version with a fix. please try it

@tpetricek
Copy link
Member Author

🎉 👏 Everything working now!

@forki
Copy link
Member

forki commented Aug 22, 2016

awesome!

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