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

[Bug/Feature]Problems with git #1266

Closed
2 tasks done
frog-o opened this issue Sep 4, 2023 · 11 comments
Closed
2 tasks done

[Bug/Feature]Problems with git #1266

frog-o opened this issue Sep 4, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@frog-o
Copy link

frog-o commented Sep 4, 2023

What happened?

When trying to update git with
≥Git pull
It failed failed with 'fatal: detected dubious ownership in repository at'

Doing a Google search on this error tell me that the owner ship of the **.git ** folder is not correct.

I not sure weather to mark this as a bug or feature request but we really should have a way to update git from the ide it self or at least use the correct user.

What's the expected behavior?

ls -a of a git directory should return the same as the terminal user.

I sorry if I am miss categorizeing this. I am a little disappointed that you don't include git by default even though you have clone from the menu this alone is very confusing and undocumented but even after you install git you have a problem with it failing because you are using a user that everyone has access to. This to me seems something I would consider a bug or on the other hand I made a similar issue stating it wasn't in the path and you closed it without documenting it(so maybe you would prefer to have this mark as a feature request)

In summary. I thought my old issue would remain open so people can find the solution and post problems there having with git.

Since it really is a different issue I figure I posted it and ask you please help me move tag it better.

What version of AndroidIDE you're using?

v2.5.2 (debug builds)

Relevant log output

  • Use Androidide and select clone from menu
  • Chdir to clone project
  • install git(why is it not included by default?)
git push
 failed with 'fatal: detected dubious ownership in repository at'
  • run
ls -a

Then run

whoami

User should be the same but is not.

Duplicate issues

  • This issue has not been reported yet.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@frog-o frog-o added the bug Something isn't working label Sep 4, 2023
@itsaky
Copy link
Member

itsaky commented Sep 4, 2023

≥Git pull
It failed failed with 'fatal: detected dubious ownership in repository at'

I don't think this is an issue with AndroidIDE. You should check if you have push access to the remote repository. You can't push to repository which you don't have access to.

@itsaky itsaky closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2023
@frog-o
Copy link
Author

frog-o commented Sep 7, 2023

@itsaky
From what I read I quit certain it is a permission issue (I updated my commit above to make this more clear)of Android ide and you got the derection reversed. I tring to pull not push. Please slow down and read what I wrote) This is an issue where git doesn't like the directory readable and writeable by everyone. Wich make sense on a shared drive this is a huge security hole but yes on an android system not much. I wanted to see (eventually if I ever got the time) if i or you can set the user of Androidide to a custom user and have git use that users for it pull and checkout. Issue I thought where to brainstorm ideas and share one knowledge I would really like your knowledge if this is possible . I don't have a good understanding of the terminal for android and only done basics app development however I far from a novices, I know I need to fork to commit things back I have committed many times to my own forks.

Does not plan mean you would not accept a patch if one was made for it?

@itsaky
Copy link
Member

itsaky commented Sep 9, 2023

From what I read I quit certain it is a permission issue (I updated my commit above to make this more clear)of Android ide and you got the derection reversed. I tring to pull not push.

Okay, I'll see what I can do. But, can you answer these questions first? :

  • How did you clone the repo at first?
  • Do you have multiple users set up in your device?
  • Is your device rooted?
  • Have you tried to reproduce this issue with another repository?
  • Can you provide steps to reproduce this issue (steps, video, etc)? It's gonna be hard to debug/fix if I don't know what's the cause of the error.

@itsaky itsaky reopened this Sep 9, 2023
@frog-o
Copy link
Author

frog-o commented Sep 9, 2023

Some of your questions I feel I have already answered and it making me frustrated so please forgive as I try to work with you on this and as
I try to do better thank you.

How did you clone the repo at first?

I used androidide to clone the URL I got from GitHub code tab for Androidide. This cloning has not a pleasant experience everything kind of slow (but I know it's a beta so I went to do other things ,Wich i don't know now if it allowed me to do) I keep running into issues where andriodide get discount because the main thread git closed since it not a service. I came back later

I hear you say ahhh here is your problem you didn't clone wright?

I won't lie it could be but in your document you said to feel free to let you know of any issues you're having(I thought so they can be fix)

I thought that this might be a problem so I tried reclone again but it told me it already was cloned and didn't tell me where it cloned to. So after dig though the file system look at android/data for a long time I discover
It was not in android data but at the root of the file system under androidaide.

Great this is cool make total sense 👍

Since I have files it tells me that it probably clone correctly (it probably not the case and doesn't effect permission). Google the error tells you git doesn't like the .git directory permissions.

Do you have multiple users set up in your device?

As far as I know no I used things pretty much as default.
< # Is your device rooted?
No

Have you tried to reproduce this issue with another repository?

I have tried clone several. There a lot of things I have to try yet I was going to document them as I tried them but I thought you would only want to work on one thing at a time

Am I wrong?

Can you provide steps to reproduce this issue (steps, video, etc)? It's gonna be hard to debug/fix if I don't know what's the cause of the error.

It's gonna be hard to debug/fix if I don't know what's the cause of the error

Just for your info I told you what caused the error and a quick Google search of the error IMHO will lead you to the same conclusion. Git doesn't want to be pulled by just any user.

I put the step ABOVE 👆 and copied  them here my. Start with cloning

- Using androidide meny select clone from menu.

- Change dir to clone project

- install git(why is it not included by default?)

Then look at the user with ls and whoamI. You can see what I mean.

While I probably could do a workaround just by just cloning from the terminal or use git config or ad safe directory it doesn't seem to be the correct way to do it. As a developer I would have to know a lot more know about your project end goal before I could fix this myself, for example if you're going to make this work on Google play or latter version of Android the git client probably should be moved to a plugin. One thing that seem cool to me is the( android terminal program you using) talked about pack each program it uses in a APK installable on Google play. They had a link to a website but it is broken. I can see why they would not want to support all there package and way this was abandoned, but for a project such as Androidide where only a small sunset of program are supported this IMHO would be great.

Please note I use my tablet for almost everything.

I have program using aide in the past Wich is just full of bug(but it includes the NDK) I have done a little in the past on the desktop but got real annoyed by the sluggish behave and there stupid emulator in android studio. I have gotten rid of my desktop because work has always kept me busy and never gave me any free time to do anything.

Covid changed a lot for me and know I give myself time and I would like to help with beta testing when people allow me to. I can't report anything if they keep closing issues without fixing problems. There's a lot I would like to do but I need androidaide to work on androidaide first.

There is also a lot I would like to know like if you plan on making this # available on Google Play (hard to do I know) The terminal you are using doesn't support it. I do my research.

@BanDroid
Copy link
Member

BanDroid commented Sep 9, 2023

do you clone using terminal or using Clone Git in the app? if terminal, you could set your git users

@frog-o
Copy link
Author

frog-o commented Sep 9, 2023

@BanDroid

do you clone using terminal or using Clone Git in the app? if terminal, you could set your git users

Thank you for your reply I was using the app but from what I can see as right now you probably better off using the terminal. I have a lot more testing I have to do yet though but just write really stress me out . I try to talk about problem before I attempt any fix. I haven't been able to do much as of right now because of my lack of knowledge, poor communication skills, lack of time etc.

I could really use words of encouragement every once in awhile.

@frog-o
Copy link
Author

frog-o commented Sep 17, 2023

@itsaky update on bug hunt
I want to open this issue because I trying to solve this error myself and not to duplicate effort


Eventually I would like to make androidide GitHub integration how-to.
To do this, I first have to get git working correctly.
I can see clearly the permissions are wrong 
but 
my question is can this be fixed?

I don't want to keep bothering you
so I won't mention you again but I wanted you to know what I tried and that I am going to keep updating this issue

I don't want to duplicate work

Things I have tried

Interestingly if you create a directory in androidaide it doesn't create it for the user you are

Mkdir test
≥ ls -al test
Output
drwxrwx--- 2 root everybody 4096 Sep 17 07:26 test

I also installed the github client

pkg install gh

@Rafael2616
Copy link
Contributor

Try configuring Git again, this works fine for me

VID-20230917-WA0000.2.mp4

@frog-o
Copy link
Author

frog-o commented Sep 17, 2023

@Rafael2616

I tried running git init still having same problem doesn't change user name of .git folder. I using android-10 so most of my problems I think are thanks to that. It looks like a lot has change (with permission and execution) on Android-10+. Currently I am looking at resources for explaining what going on in android-10 such as wr permission and This I plan to post more when i find it.

@itsaky
Copy link
Member

itsaky commented Sep 19, 2023

drwxrwx--- 2 root everybody 4096 Sep 17 07:26 test

Just analyze this output. Your directory is not accessible to users other than "root" or users who are part of group "everybody". Check if your current user can access the directory.

Interestingly if you create a directory in androidaide it doesn't create it for the user you are

AndroidIDE doesn't decide the user while opening the terminal or doing anything else. AndroidIDE won't even be able to change the user unless you do it yourself.

I don't think this issue originates from AndroidIDE. If you do, then at least provide steps so that we can reproduce this on our own devices.

@itsaky itsaky closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2023
@frog-o
Copy link
Author

frog-o commented Sep 19, 2023

@itsaky
I don't know why you want to close something without providing a fix . Don't you use an emulator?

Setting it to android -10 ( or use anything above) should do. I read on one of issue ( I think somewhere in termux issue )that it is not possibly to change the user.

Interestingly if you create a directory in androidaide it doesn't create it for the user you are.

Yep, I think termux calls an android service Wich has root.

Please note it also says root. My tablet not rooted.

I was hoping to find someone who knows more about permission on Android I thought open issues allowed for that. people don't typically read closed one. If you are saying you aren't going to support android-10 or above then I can expect this I guess. By the way my tablet is not rooted and it shows root. Android handle permissions very strangely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants