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

IllegalArgumentException #3

Open
daimoniuma opened this issue May 19, 2022 · 9 comments
Open

IllegalArgumentException #3

daimoniuma opened this issue May 19, 2022 · 9 comments

Comments

@daimoniuma
Copy link

Crash while trying to push commit.

FATAL EXCEPTION: Thread-9 Process: dev.plom.plomgit, PID: 12253 java.lang.IllegalArgumentException: Unexpected char 0x0a at 82 in header value: Basic **[PRIVATE INFO DELETED]**== at com.android.okhttp.Headers$Builder.checkNameAndValue(Headers.java:319) at com.android.okhttp.Headers$Builder.set(Headers.java:280) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.setRequestProperty(HttpURLConnectionImpl.java:566) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.setRequestProperty(DelegatingHttpsURLConnection.java:259) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.setRequestProperty(HttpsURLConnectionImpl.java:30) at com.example.libgit2.GitHttpClient.setCredentials(GitHttpClient.java:77)

@my2iu
Copy link
Owner

my2iu commented May 19, 2022

It seems to be complaining that you put a newline in your username or password (it might be a cut&paste issue). I’ll add code to filter out those illegal characters.

@daimoniuma
Copy link
Author

daimoniuma commented May 19, 2022

I tried to put SSH key.

-----BEGIN RSA PRIVATE KEY-----
[SECRET DELETED]
-----END RSA PRIVATE KEY-----

And without first and last lines. Without spaces. Crashes anyway.

@my2iu
Copy link
Owner

my2iu commented May 19, 2022

The app doesn’t support ssh. It only supports https connections. Including support for ssh requires adding OpenSSL to the app, which triggers extra scrutiny for US export restrictions on cryptography. Most git providers can generate special passcodes that can be used for git over https.

@daimoniuma
Copy link
Author

Do you mean it's useless for Github? 😧 It's nonsense about law violation. You aren't exporting some proprietary cipher from US to world. You'll just implement open source. It's legal as you aren't using it in messaging between peoples. You'll just open session to push code commit.

@my2iu
Copy link
Owner

my2iu commented May 19, 2022

Here are specific instructions for using PlomGit with GitHub.

If I include a copy of the OpenSSL library with PlomGit, then I’m exporting a full encryption library with the app. Anyone can extract the library and use it for other encryption purposes. I admit that it’s probably still legal. People with in-app purchases in their app also tend to include OpenSSL to verify signatures on app purchases, etc. but I don’t want that hassle personally. Since it’s open source, someone else can just create their own fork with OpenSSL in it and release their own version.

@daimoniuma
Copy link
Author

Open source... Fine. Just write in Gradle dependency. F-Droid will compile and publish it automatically. So law violation will be on F-Droid owner. 😏

@my2iu
Copy link
Owner

my2iu commented May 19, 2022

There are other open source git apps on Android. They are almost certainly better than this app. I mainly created PlomGit because I’m trying to design a cellphone programming language, and I couldn’t find a free git app for the iPhone to use with my programming language, so I decided to throw together something in Flutter. (Since there is a $100 annual fee for having an iPhone app, there isn’t a rich ecosystem of free or open source apps for the iPhone like there is for Android.)

@daimoniuma
Copy link
Author

You are wrong. I tried all possible apps to push commits from a phone. Last working app was MGit but it's broken after my system update to Android 11 (new storage restrictions). It wasn't good anyway. Your app looks good (material) and simple. But SSH is missed. 😔 Really. Don't worry. F-Droid will find somewhere SSH lib (you don't know about it anything) and will publish it by itself without you.

@my2iu
Copy link
Owner

my2iu commented May 19, 2022

I’ll think about it. Adding support for ssh would require a bunch of UI work for making screens for inputting ssh keys and checking known_hosts etc. Like, this is mainly a diversion for me from my actual goal of working on my programming language, so it might be a while. Personally, I’m secretly hoping the GitTouch guy would suck up this code into his app so that his app could do git operations. He seems much more talented with UIs and more dedicated than me.

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

No branches or pull requests

2 participants