Comments (5)
Related: Using push like this does work:
$repo->push('https://USERNAME:[email protected]/USERNAME/REPO.git', 'BRANCHNAME');
from git.php.
You could try using the git-credential-cache command to tell git to remember the password for future commands.
from git.php.
Hmm... Okay, I've created ~/.git-credentials in format: https://username:[email protected]\n
and am trying to push like: $repo->push('https://www.github.com/username/repo.git', 'branch-name')
and am getting the following error: Exception: fatal: could not read Username for 'https://github.com': Device not configured in GitRepo->run_command()
Thanks for the fast response, by the way!
from git.php.
Is there some reason specifically that giving the credentials in the push command like you show above isn't good enough? It might help me to figure out a solution if I know your specific limitations/needs.
from git.php.
Hi!
Not really -- supplying them like the above is both flexible and effective. I guess I'm keeping the issue open because I'm curious as to whether there's another way to authenticate.
That said, I think my earlier issue might've been caused by trying to push a repo with no remote -- I had a repo with another repo inside of it, and I was trying to push the latter instead of the former.
Closing now -- feel free to reopen if you want to add documentation on using digest or key-based auth.
from git.php.
Related Issues (20)
- How to push changes to repository if you dont have username and password config in local folder HOT 1
- error HOT 2
- Array to string conversion HOT 1
- Concurrent handle ?
- How do I set up a sshkey Like this
- Bypass of PHP issue
- Fatal error: Uncaught exception 'Exception' with message 'error: unable to unlink
- On commit not finding use.name nor user.email HOT 2
- 0
- Add this library to Packagist please. HOT 2
- empty Exception thrown HOT 3
- Library doesn't work on FreeBSD HOT 10
- Push where upstream branch does not exist
- Host key verification failure HOT 1
- Line 333 throws error on "config --get alias.example"
- PHP hanging indefinitely due to stream_get_contents HOT 2
- fetch error
- Git Pull/Push error HOT 1
- Thrown ConsoleException when git command returns nothing HOT 1
- Composer 2.0 package-name // Uppercase name will error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git.php.