Comments (3)
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.
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.
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)
- Get-GitHubRepositoryLanguage for multiple repos? HOT 5
- Missing contributors from Get-GitHubRepositoryContributor
- Missing Org Role information from Get-GitHubOrganizationMember HOT 1
- Get-GitHubUser fails HOT 3
- PSProvider for GitHub
- Get-GitHubOrganizationMember does not use DefaultOwnerName
- GitHubRepositories: Unit Tests are Failing when Checking for `has_wiki` on Private Repositories
- Add support for authentication with JWT HOT 2
- API Coverage: Add Support for Codespaces HOT 1
- Exported functions not behaving correctly with -ErrorAction SilentlyContinue HOT 3
- Get-GitHubIssue commands different output
- Add additional filtering parameters to Get-GitHubPullRequest
- Reliance on BinaryFormatter breaks module with PowerShell 7.4.0-preview.4 HOT 5
- telemetry error HOT 3
- telemetry error HOT 1
- Powershell core on linux HOT 2
- JiwJiw73 HOT 1
- Get-GithubRepository doesn't appear to honor ErrorAction inside a a try/catch HOT 1
- JiwJiw73
- Encountered a problem while trying to record telemetry events
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 powershellforgithub.