Giter VIP home page Giter VIP logo

Comments (5)

aendra-rininsland avatar aendra-rininsland commented on August 16, 2024 1

Related: Using push like this does work:
$repo->push('https://USERNAME:[email protected]/USERNAME/REPO.git', 'BRANCHNAME');

from git.php.

kbjr avatar kbjr commented on August 16, 2024

You could try using the git-credential-cache command to tell git to remember the password for future commands.

from git.php.

aendra-rininsland avatar aendra-rininsland commented on August 16, 2024

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.

kbjr avatar kbjr commented on August 16, 2024

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.

aendra-rininsland avatar aendra-rininsland commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.