skinnymind / libgit2dart Goto Github PK
View Code? Open in Web Editor NEWDart bindings to libgit2
Home Page: https://pub.dev/packages/libgit2dart
License: MIT License
Dart bindings to libgit2
Home Page: https://pub.dev/packages/libgit2dart
License: MIT License
ReceivePort receivePort = ReceivePort();
sendPort.send(receivePort.sendPort);
receivePort.listen((params) {
...
try{
...
var keypair = Keypair(username: username,pubKey: sshKey.publicKeyPath ,privateKey: sshKey.privateKeyPath,passPhrase: sshKey.passPhrasePath);
var callbacks = Callbacks(credentials: keypair,
sidebandProgress: (progress){
sendPort.send(progress);
print(progress);
}
);
remote.push(refspecs: ['refs/heads/master'],callbacks: callbacks);
print('push to ${remote.url} success !');
remote.free();
sendPort.send('success');
}catch(e){
print('push error:$e');
...
}
});
Due to the issue in this library google/pub_cache#47 unable to find the pub-cache on MacOS.
Error is
Copying libgit2 for macos
Unhandled exception:
Null check operator used on a null value
#0 copyLibrary (file:///Users/.../.pub-cache/hosted/pub.dev/libgit2dart-1.2.1/bin/setup.dart:42:27)
Hello again! I am trying to get a diff to the HEAD reference.
However, repo.diff(...)
only accepts trees as arguments.
Is this possible with libgit2dart? Thanks!
PS.: It would be very cool to get be able to contact you over gitter for example - or other platforms for small things like this, maybe you could create a room for libgit2dart
?
libgit2dart/macos/libgit2dart.podspec
Line 18 in b66662f
dylib name should be libgit2.1.5.dylib or it will be fail to find the lib when running
otool -L ./fgit show
@rpath/libgit2.1.5.dylib (compatibility version 1.5.0, current version 1.5.0)
➜ fgit fvm flutter doctor -v
[!] Flutter (Channel stable, 3.7.4, on macOS 12.6.3 21G419 darwin-x64, locale zh-Hans-CN)
• Flutter version 3.7.4 on channel stable at /Users/liugang/fvm/versions/3.7.4
! Warning: `dart` on your path resolves to /usr/local/Cellar/dart/2.19.2/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/liugang/fvm/versions/3.7.4. Consider adding /Users/liugang/fvm/versions/3.7.4/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision b4bce91dd0 (4 days ago), 2023-02-21 09:50:50 +0800
• Engine revision 248290d6d5
• Dart version 2.19.2
• DevTools version 2.20.1
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc2)
• Android SDK at /Users/liugang/Dev/android-sdk-macosx
• Platform android-31, build-tools 33.0.0-rc2
• Java binary at: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java
• Java version Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
! CocoaPods 1.10.1 out of date (1.11.0 is recommended).
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (version 2022.1)
• Android Studio at /Users/liugang/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9514443/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.2)
• IntelliJ at /Users/liugang/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.2)
• IntelliJ at /Users/liugang/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/223.8617.56/IntelliJ IDEA.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.75.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.58.0
[✓] Proxy Configuration
• HTTP_PROXY is set
• NO_PROXY is localhost,127.0.0.1,::1
• NO_PROXY contains localhost
• NO_PROXY contains 127.0.0.1
• NO_PROXY contains ::1
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 12.6.3 21G419 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 110.0.5481.177
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 3 categories.
When I try to check that Libgit2 is installed (with print(Libgit2.version)), i get an error:
Failed to open the library. Make sure that libgit2 library is bundled with the application.
════════ Exception caught by gesture ═══════════════════════════════════════════
The following ArgumentError was thrown while handling a gesture:
Invalid argument(s): Failed to load dynamic library 'flutter_app_repo_path\.dart_tool\libgit2\windows\libgit2-1.5.0.dll': error code 126
This is a Flutter Windows project.
I tried dart run libgit2dart:setup but it did not help.
OS: Windows 11 22621.819
Flutter: 3.3.8
Dart: 2.18.4
Hello,
I'm new to Dart, maybe there is something that I'm missing.
I have pure Dart app and wanted to require your package. The readme says that this package should work in dart but because of
environment:
sdk: ">=2.17.0 <3.0.0"
flutter: ">=3.0.0"
I'm not able to update dependencies because my app is not a flutter app.
Is there a way that I can add this package to app that is not a flutter app?
Add ability to use package in Flutter applications on Linux, macOS and Windows bundling dynamic library with application
Hello, thanks for providing this library!
I am considering to use it for my project!
However, I am pretty new to Dart and Flutter, so I am a bit lost about how to install it.
It is not listed in the official repositories (pub.dev), so I guess I'd have to install it 'by hand' - do you have some hint on how to do that?
Thanks!
I had some problems with SSH tests on the Windows platform.
Could you clarify for me, is it my fault or the restriction of the library?
libgit2dart/test/credentials_test.dart
Line 86 in b66662f
libgit2dart/test/credentials_test.dart
Line 188 in b66662f
libgit2dart/test/credentials_test.dart
Line 215 in b66662f
Thanks for making this plugin!
I'm on an ARM mac and had build errors about needing an arm64 binary when I tried to use the plugin.
I checked and running file macos/libgit2-1.5.0.dylib
gives:
macos/libgit2-1.5.0.dylib: Mach-O 64-bit dynamically linked shared library x86_64
I built a universal binary with libgit2 and replaced the libgit2dart/macos/libgit2-1.5.0.dylib
but then the build wasn’t finding the dylib until I put a (slightly differently named) dylib in a folder the app was checking in but then was still getting a different error that said:
“Failed to open the library. Make sure that libgit2 library is bundled with the application.”
I did get a dylib that I built to work by putting it straight in an empty project (ie. no plugin) so I guess I must have messed up the libgit2dart project config somehow. I've given up for now but happy to have another go if it's helpful.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.