Giter Site home page Giter Site logo

Comments (3)

HowardWolosky avatar HowardWolosky commented on May 18, 2024

Hi Neal,

The GitLab and GitHub API's are not quite the same, so this module would not work with it (at least not without some decent amount of modification).

As an aside, you can't create a SecureString that way. You don't need a SecureString to work with this module since it directly works with a PSCredential object (refer to the [Configuration] (https://github.com/PowerShell/PowerShellForGitHub#configuration) documentation) (and a PSCredential uses SecureString behind the scenes).

If you really wanted to get a SecureString for some other purpose, you'd get it by doing the following:

$cred = Get-Credential
# Enter anything in for username and then enter in your token as the password
$cred.Password # this will be the SecureString
$cred.Password | ConvertFrom-SecureString # this will give you an ASCII representation of the secure string which you can then convert back to a secure string using your previously referenced ConvertTo-SecureString

from powershellforgithub.

NealWalters avatar NealWalters commented on May 18, 2024

Thanks, I'm playing with PSGitLab as well, but can't find a clone/commit function with them. Seems like standard GitHub command line works with GitLab, so I thought maybe the interface was close enough.

By the way, I got that "SecureString" code by doing the following:

Get-Help Set-GitHubAuthentication -ShowWindow
It's Example #2. So I think it's code you provided in your docs, am I wrong?

Neal

from powershellforgithub.

HowardWolosky avatar HowardWolosky commented on May 18, 2024

Thanks for pointing out the confusing example. That should have been more clear that <Your Access Token> should have already been in a secure string form. I'll get that example cleaned-up a bit.

As for your core concern, cloning and committing should be done directly through git itself. Where a module like this or PSGitLab come into play is how you further manage a project (like controlling issues, creating forks, managing teams/orgs, etc...). Cloning and committing are core git commands that git.exe should be able to handle on any repo, regardless of where it's hosted (GitHub, DevOps, GitLab, etc...).

from powershellforgithub.

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.